Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including twitter-following-editor with all npm packages installed. Try it out:

var twitterFollowingEditor = require("twitter-following-editor")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

twitter-following-editor v0.1.1

programmatically follow & unfollow people on Twitter w/out API access

Twitter Following Editor

Build Status NPM version NPM license

A tool for unfollowing / following people on Twitter, programmatically, without API access. This is useful if you need to edit large lists of people who you're following, on several accounts that you own, and you don't want to attach an app to each and every one of them.

Rather than using an API key, this tool signs into accounts using a username and password, and sends the same follow/unfollow requests that are generated when you press a follow/unfollow button on the Twitter website.

Example

CLI

The CLI operates entirely over STDIN / STDOUT, and works by piping in an array of "action" objects. Each action object specifies a username or user id, and an action. For example, the following action object would make the account you're logged in with follow slang800. Feel free to test this action object out on whatever accounts you want:

{
  "username": "slang800",
  "action": "follow"
}

We can pipe this into the command like this:

$ echo '[{"username":"slang800","action":"follow"}]' | twitter-following-editor -u exampleusername -p examplepassword
login done
following slang800

Of course, the real use-case for this tool is to process thousands of follow/unfollow commands at a time. So it's more likely that we would put actions into a file and pipe them in that way:

$ cat ./example.json
[{"username": "slang800", "action": "follow"},
{"userId": 12513472, "action": "unfollow"},
{"username": "neilhimself", "action": "follow"},
{"username": "buzzfeed", "action": "unfollow"},
{"userId": 516047986, "action": "follow"}]
$ twitter-following-editor -u exampleusername -p examplepassword < example.json
login done
following slang800
not-following cracked
following neilhimself
not-following BuzzFeed
following pentametron

Caveats

  • This is probably against the Twitter TOS, so don't use it if that sort of thing worries you.
  • Whenever Twitter updates certain parts of their front-end this tool will need to be updated to support the changes.

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free