Skip to content

Get the user IDs of the followers of a tweep (twitter user) using PHP code.

Notifications You must be signed in to change notification settings

aphoe/twitter-followers-id

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

##About This repository code is a crude script to get the User IDs of the followers of a twitter user.

This code implements Twitter API 1.1, as such you need to create an app from your twitter account.

I have tried to comment my code as much as I should and I have used user-friendly variable names but sometimes... my brain thinks faster than my hands could type so some things are skipped ;)

##Instructions

  1. Download the zipped file (or clone the repo) and extract to your web server.
  2. open follow.php and do the following
  3. Add the username of the user whose follower you want to save
  4. Add your Twitter App values to lines 12-15
  5. Run the script from your web browser via localhost or webserver.
  6. The followers will be saved to a file in the followers folder. The naming format of the text file is [username]_followers.txt

##PHP Server info Just in case the list of followers is quite high, you might have to change the max_execution_time config value in your PHP Config file ie php.ini to something meaningful.

I used a value of 43200 (12 hours) on my test server. Although no script I used during test took that long.

Twitter only allows for 15 requests every 15minutes, so the script has to sleep for 15 minutes everytime the 15 request has been reached.

##Imported libraries The project uses the OAuth Library PHP scripts. and are available in the lib folder

About

Get the user IDs of the followers of a tweep (twitter user) using PHP code.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages