1

Is there any way to extract twitter handles, bio and location of people following a account?

2
  • Do you mean a specific Twitter page? – Oliver Frost May 17 '16 at 9:27
  • @oliver frost Yes I was looking for a particular twitter page. Your answer helped a lot. Thanks! – Dennish Jose May 18 '16 at 13:23
3

Yes, this information is publicly available from the Twitter REST API. You will need to register an application on https://apps.twitter.com. You can make the calls with Python or R.

My R example:

library(twitteR) # install.packages("twitteR")

# Authenticate 
api_key <- "a"
api_secret <- "b"
access_token <- "c"
access_token_secret <- "d"

# This creates an auth file in your working directory, so you will need to run this at least once before your first ever load.

setup_twitter_oauth(api_key, api_secret, access_token, access_token_secret) 

# Get the page information
yourUser <- getUser("ConsolidataLtd")

# Get that user's Twitter followers.
yourUser.Followers <- lookupUsers(yourUser$getFollowerIDs())
yourUser.Followers <- twListToDF(yourUser.Followers)
1

The Twitter API endpoints you want are, for example

  1. getfollowers

  2. getuser

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.