May we use cdn.api.twitter for follower counts?


#1

I’d like to allow users to enter a Twitter handle and get back some very basic public data about that person – mainly # of followers and date joined, both accessible publicly on Twitter’s website.

By dynamically adding a “follow this person” button to the page, Twitter makes a call to cdn.api.twitter.com to get this information.

Is it okay to piggyback on that call and get a few other datapoints from the response? This would not alter the communication in any way. The “follow me” button retrieves the full user information automatically.


#2

The APIs on cdn.api.twitter.com are meant to be used by the official Twitter widgets only.
If you want to get the number of followers or creation date for a user, you have to use the REST API.
https://dev.twitter.com/docs/api/1.1/get/users/show (to get the data for 1 user)
https://dev.twitter.com/docs/api/1.1/get/users/lookup (to get the data for multiple users at once)
However, you can’t call the REST API directly from client-side Javascript, you have to call it from your server-side.


#3

#4

#5