I want to scan profile data of followers.
My goal is to get followers numbers having Less then 20 twits or 10 followers.
I know how to get followers profile data.
Now, problem is suppose a profile have 1,00,000 Followers, than its a very big task to fatch all the profile data and identify profile having Less then 20 twits or 10 followers. And i need to make 1,00,000 twitter api calls, I this is not good idea.
Example : http://twitblock.org/
Is there any way to solve this ?
Thanks In advance !
a) get his followers followers/ids up to 5000 in single request, that's at at at least 20 requests (21 or 22 just to be safe)
b) get info on each follower users/lookup up to 100 in single request, that's 1000 requests
Given you can make no more than 350 requests per hour, per oAuth account you will need to use oAuth credentials of multiple authenticated users (3 users to be exact).
Related
I am looking to get the count of how many users were mentioned by a particular user in its tweets for a specific period of time.
I am looking to achieve it in Twitter API 1.1
For example, an arbitrary user #user1 mentioned 20 users in his tweets since last 10 days.
Can we get the total Retweet_Count per an account OR per Screenname like followers count at user level as followers count is a property associated with user information, Where as Retweet_Count is a field associated with each individual Tweet.
I'm thinking I need to get all the tweets of a user then add the filed Retweet_Count in each & every tweet a user received. Here the problem is the total number of tweets getting using twitter rest api are limited to last 200 tweets (only 2 weeks old tweets in these 200).
We cannot find historical tweets with Streaming API, If we store all the real time tweets using streaming api in our local database then with the use of id of each tweet record in our local data base we need to call twitter rest api call(GET statuses/show/:id) in a loop, then add all the Retweet_Count value in this loop. But due to this the number of restapi calls are increasing to get the total Retweet_Count.
Please suggest me for the better approach.
No, that's not at all possible .
Since the retweet_count associates with each tweet, you need to get all the tweets first.
The reason why i said it's impossible is because if a user has more than 3200 tweets, then you can't get the exact retweet_count as twitter offers only 3200 most recent tweets of a user through GET statuses/user_timeline.
GET statuses/user_timeline method can only return up to 3,200 of a
user’s most recent Tweets. Native retweets of other statuses by the
user is included in this total, regardless of whether include_rts is
set to false when requesting this resource.
One more thing. Some Tweets retweent_count may vary time to time. I mean some may undo retweet & some may retweet old tweet or past week tweet. So, you need to retrieve all the tweets again and again to update-to-date with exact retweet_count. By doing this, there are more chances that you will fall in Twitter's Rate Limit.
Here is a sample query which returns the twitter ids of followers of examplename:
https://api.twitter.com/1/followers/ids.json?cursor=-1&screen_name=examplename
This works great. However I would like to get followers of up to 5 different twitter accounts. This would mean 5 api calls which is inefficient and not good because I don't want to exceed the api limit. So is there a way to combine 5 different queries into 1?
This web application I am building could potentially be used by 100 simultaneous users at once, according to my employer. Would using authentication (oauth codes) increase my rate limit?
Thanks.
a) No, just stick with tihis method.
b) Yes, if you get oAuth credentials of every user you are trying to get details of (they have logged in), then you can sign each API request using their own oauth token/secret and you don't have any concerns about rate limiting. You can make up to 350 requests per hour using each users credentials.
I am able to extract tweets, and the submitter's user details using the streaming API, but I also need the list of followers and friends of users posting these tweets.
I am aware that Twitter search API has the friends/ids and followers/ids functions through which one can get the public followers and friends list one user at a time.
But, my data collection requires getting this information for all the users whose tweets I have collected, around 20,000+ users. This is quite exhaustive given the high number of users, and the limitation of one user per call. Moreover, I need to refresh this list for each of these 20,000+ users preferably once a day to observe changes in their friends and followers (if any).
IS there any I can achieve this using the Twitter Streaming API or any other method. Or I have to apply for the Twitter commercial data license?
Thanks!!!
20,000 is way beyond the limits of any normal Twitter API method. I think your going to have to apply for a commercial license to go that high. The streaming API, I believe, tracks 400 keywords and 5000 users max. Your right in that the REST twitter API method only allows you to track one user or a list of ID's. You can take a look at the Twitter Counter API which mines additional info including information about followers, etc. But again, 20,000 I'm sure would be above the limits. Communicate with Twitter, Gnip and, and the Twitter Counter service to see what they can do for you.
Twitter Counter API:
http://twittercounter.com/pages/api?ref=footer
I am integrating Twitter into my mobile app. I am trying to get the friends or follower's ids and nicknames. One solution that I can find out is, using "friends/ids" to get the friends/followers ids, then "user/show" to get the user info.
However, "user/show" returns extended information of the user, if a user has a lot of friends/follower (say 1000), it will be very slow to get nick name of the user.
I wonder if there is any API that only returns ids and nicknames of friends or followers. Or there is other lightweight approach to resolve this issue.
There is no Twitter API call that just returns the screen names. You can use /friends/ids to get the user ids of 5,000 friends with each API call, and then use users/lookup to get the account info on 100 of these at a time. But you are limited to only 350 API calls per hour.
If you are building an app that is based on knowing all of the friends or followers of your users, you need to plan the way you present that. You cannot do what Twitter does, and expect to let someone login and then instantly display all their friends and followers. One way to deal with this is to ask for 24 hours to assemble their complete social network. The other technique is store every user's full profile into a database, so you don't have to look them up again.