How to Auto follow on twitter



To auto follow a long list of twitter followers on twitter, do the following:

1. In your firefox browser open up the entire user listing by holding down the spacebar/page down key until you have all the accounts you want to grab.
2. Press shft+ctrl+c to open up the browser console. Then switch to the 2nd tab that should be named console.
3. copy and paste the following javascript code into the browser console. You might need to first type in 'allow pasting' or something similar. Press enter.
4. Sit back relax and follow stuff till the cap.


Javascript code:

var FOLLOW_PAUSE = 1250;
var FOLLOW_RAND = 250;
var PAGE_WAIT = 2000;
__cnt__ = 0;
var f;
f = function() {
var eles;
var __lcnt__ = 0;
eles = jQuery('.Grid-cell .not-following .follow-text').each(function(i, ele) {
ele = jQuery(ele);
if (ele.css('display') != 'block') {
console.trace('Already following: ' + i);
return;
}
setTimeout(function() {
console.trace("Following " + i + " of " + eles.length);
ele.click();
if ((eles.length - 1) == i) {
console.trace("Scrolling...");
window.scrollTo(0, document.body.scrollHeight);
setTimeout(function() {
f();
}, PAGE_WAIT);
}
}, __lcnt__++ * FOLLOW_PAUSE + Math.random()*(FOLLOW_RAND) - FOLLOW_RAND/2);
__cnt__++;
});
}
f();





How to Auto tweet on twitter



For this tutorial to work you'll need to be a guy that runs a around the clock home server. You'll need the python scripting language (http://python.org)
and you will need the python module tweepy (use the install command 'pip install tweepy' in a msdos/linux command shell).

Now you will need twitter API keys which you can get freely at https://apps.twitter.com/. Log in and select 'Create New App', next you should fill out the required
fields and press the 'Create your twitter application' button. Now head over to the 'Keys and tokens tab' and notice 'Consumer Key' and 'Consumer Secret'. Next click the
'Regenerate Access Token button' and take notice of the 'Access Token' and the 'Access Token Secret' fields. Sometimes depending on Twitters mood you'll also need to activate
your application, look around on their dev page if the script gets authentication errors
. You now have all you need to move on to the python script.

Python script:

import tweepy
import time

def get_api(cfg):
 auth = tweepy.OAuthHandler(cfg['consumer_key'], cfg['consumer_secret'])
 auth.set_access_token(cfg['access_token'], cfg['access_token_secret'])
 return tweepy.API(auth)


def main():
# Replace the XXXX values with the twitter api information!
 cfg = {
  "consumer_key" : "XXXXXXXXXXXX",
 "consumer_secret" : "XXXXXXXXXXXX",
 "access_token" : "XXXXXXXXXXXX",
  "access_token_secret" : "XXXXXXXXXXXX"
}

 api = get_api(cfg)
 cont = 1

 while(cont):

  #Text tweet:
  tweet = "Metal vid: https://youtu.be/F7cPgonpbwo - @marilynmanson - Sweet Dreams"
  status = api.update_status(status=tweet)
  time.sleep(15000)

  #Tweet with picture:
  tweet = "Out having a burger but still tweeting hot and strong! #metal #heavy"
  pic = "twpic.jpg"
  status = api.update_with_media(pic,status=tweet)
  time.sleep(15000)

if __name__ == "__main__":
 main()



Download the script here: autotweeter.py and edit the tweets to your liking. Replace the values of consumer_key, consumer_secret, access_token, access_token_secret with your own API keys. You can set the delay between tweets by editing the 'time.sleep(15000)' line of code where 15000 is the amount of seconds to wait for next tweet. Now run the script by typing 'python autotweeter.py' in a msdos/linux command shell while of course being in the relevant file directory.

Your computer should now be auto tweeting around the clock!