Skip to main content

Instaworries -- and a resulting mass unfollowing hack

Self Portrait in Christmas BallThe other day I noticed/remembered that I had an instagram account. And, according to my sister, I was quite active on it. Apparently. I kept following new persons. That suprised me, so I logged on and investigated. “I” followed 974 (or so) persons I had never heard of… My first instinct was to delete the account.* But that would have been too easy, so I decided to investigate the Instagram-API to see if that could help me “get rid” (most) of the people I followed. And lo and behold I found this page - very promising, so I registered an app to get access to this. Since Instagram uses OAuth that landed me a client ID and a client secret.

Not awfully familiar with the innards of OAuth, I realized that for anything to work I would need an access token. Since this script was just for personal use, I figured I could just generate this once(ish) and use that to get access to my account. I followed the instructions on this (page): http://dmolsen.com/2013/04/05/generating-access-tokens-for-instagram/ to generate the token. The only change I did, since we want to be able to manipulate followers/relationships, was to add a “&scope=relationships” to the end of the url to get the pre-token “code”, like so:

(Admittedly, this took some trial and error and duckduckgoing to figure out…)

In the oven
Equiped with the resulting many character access token I set about to write a unfollowing script thingy using good old ruby, leveraging the already existing Instagram gem. One “gem install instagram” later I started hacking.
After setting up the Instagram object with the client id and secret, I actually only use the instagram gem for loading of the list of followers, like so:
I realized that I had some “real” followers that I do not want to unfollow, so before unfollowing any user I check to see that their id is not among my followers.

To do the actual unfollowing I just access the REST API directly using the HTTPI gem and my access token, like so:
The only problem with this approach is that the API has some restrictions on number of calls per day, so I need to keep running this script once a day for… quite some days.

*Well, that is a lie. First I changed the password...

Comments

  1. For mass unfollows I really like fast-unfollow.com. I used Instagress a couple months, but it's slowly and expensive. I was looking for other ways, and found fast-unfollow.com . The most important that fast-unfollow.com can do up to 5000 unfollows a day. It's just speed what I need. By the way, the price more than reasonable, and I got first 1000 unfollows for free.

    ReplyDelete
  2. You shouldn't bear with it. Just try to use app, which can give your real followers :D And your problem will be solved) I think Zengram is your way,inasmuch as it can help your unfollow smb, gain new followers, etc.

    ReplyDelete

Post a Comment

Popular posts from this blog

Fix your rapid blinking Marantz SR-6004 using nothing but 3 fingers - and a thumb

A couple of years ago my (most of the time excellent) Maranz SR6004 acted up. It did't want to turn itself on. Properly. Just stood there and blinked rapidly. Its little red light that is. At me. The solution was so simple that I didn't bother to write it down as I was sure to remember it. Alas, no. Some weeks ago it did it again. (Can it be the heat?) Just stood there blinking rapidly at me. The manual just said - as it said last time around - that it was time to return the unit to it's maker. Or similar. Some googling led me to this page:  http://www.allquests.com/question/4056803/Marantz-XXX4-Series-Failure-Issues.html  The technical term for what I had experienced seems to be "The Pop of Death". Aïe. But!, humongous letters said: YOU CAN SOMETIMES RESET THE UNIT BY PRESSING SURR MODE, CLEAR AND EXIT SIMULTANEOUSLY And so I did. And so it was fixed. And all was well. (And now I have written it down for the next time.)

Fix upside down Skype video in Ubuntu 12.10 [UPDATED]

When launching Skype in 64-bit Ubuntu 12.10 on my Asus U35J the webcam image was all topsy-turvy. Since I don't live in Australia, or something (tsk-tsk), this was not really cutting it for me.  Some quick googling led me to this forum post:  http://forums.pcpitstop.com/index.php?/topic/198236-why-is-my-skype-video-showing-upside-down/   After making sure that the necessary packages was installed (notably  libv4l-0) I adapted the command from the forum post to: LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype and voila, the image was OK. Next step is for this to be set to default, which seems to be outlined here (in steps 2 and 3):  http://pc-freak.net/blog/how-to-fix-upside-down-inverted-web-camera-laptop-asus-k51ac-issue-on-ubuntu-linux-and-debian-gnu-linux/  (Actually this post seems to cover most of what is useful from the forum post above...) UPDATE (19/04/2013): Since my laptop was working fine, I decided it was about time to fix it. Also I wanted to

Using a Raspberry Pi as a MIDI USB/5-pin bridge

In my constant... need... to get everything music instrument related to communicate with each other, I wanted to look into ways to get some of my keyboards/synths with only MIDI over USB to talk to devices with regular good old-fashioned 5-pin MIDI ports from the eighties. Cables! First I had a quick look at off the shelf solutions. The most interesting one being the Kenton MIDI USB Host – providing MIDI host functionality for USB devices as well as regular MIDI in and out in a small box. Unfortunately it is rather expensive (~125 €) and a reliable online source warned me that it was not entirely stable in collaboration with my OP-1, so I started thinking of more... home-grown solutions. I decided to try to use my old Raspberry Pi and see if that would serve as a USB host with a borrowed MIDI USB adapter. (Thanks Simon.) A cheaper, and, as an added boon, a nerdier solution. Step 1: Get the USB MIDI device up and running This was the easy part. The device I have been lent