FriendRetweet: Automatically Retweet Popular Tweets

Posted on February 15, 2015 by David Hilowitz

FriendRetweet is a command-line PHP script that allows you to automatically retweet the most popular tweets of the people you’re following. Each time it is run, the app will scan your users home timeline and find the most popular tweet since the last time it was run. It will then retweet that tweet.

Download

Download the script here: https://github.com/Decidedly/FriendRetweet

Installation

  1. Create a Twitter app for yourself at https://apps.twitter.com. Make sure you create an access token and set your permissions to read-write as well.
  2. php composer install
  3. cp config/example.config config/username.config
  4. Configure the app as follows:
    Config KeyDescription
    consumer_keyYour Twitter consumer key
    consumer_secretYour Twitter consumer secret
    access_tokenYour Twitter access token
    access_token_secretYour Twitter access token secret
    twitter_user_idYour numeric Twitter User id.
    memory_filenameA path to the file where your user’s data will be stored. These files don’t generally get very big.
    native_retweetsA value of true causes native tweets, a values of false causes us to simply tweet the same text as the source tweet.

Running the App

From the command-line, type this:

php FriendRetweet.php --config configs/username.config

No Comments »

No comments yet.

Leave a comment