I have noticed the common way to get the user's tweets is using timeline() but I want to get tweets of people I follow which twitter calls friends.
Related
Is there a way in the Twitter API v1.1 to get the id's of all the users that replied, favorited and retweeted to a particular tweet using its id?
I've searched in older posts but I didn't find an simple way to do it.
Thanks
According to Twitter Staff Episod,
It's not possible with the API after the fact for a tweet that has more than 100 retweets. You would need to collect them in real time as they happen to collect them all. The Streaming API is the best bet for tracking such things.
So, you can only get 100 Retweets ID of a tweet through REST API. Move to Streaming API to get all the Retweets ID but you can't get the past data. You can only get data in Streaming API from present - to - future.
I am building a demo Twitter app. I have fetched the search results and timeline tweets. Is there any way to get the list of people I am following and my followers? And, can my messages be fetched too?
https://dev.twitter.com/docs/api/1/get/users/lookup
https://dev.twitter.com/docs/api/1/get/users/show
https://dev.twitter.com/docs/api/1/get/friends/ids
https://dev.twitter.com/docs/api/1/get/followers/ids
Check this links to know the parameters to get the list of followers and know the REST API link for retrieve the friends and followers.
I want to see how many tweets does a link have. For Facebook, you can use FQL to get the number of Likes each page has.
Is there a page in the Twitter API documentations that describe how to do this?
This seems to work, without authentication:
http://urls.api.twitter.com/1/urls/count.json?url=example.com
For example, to get the number of tweets for this random page on mashable:
http://urls.api.twitter.com/1/urls/count.json?url=http%3A%2F%2Fmashable.com%2F2012%2F01%2F21%2Ftop-10-tech-this-week-13
Returns the following JSON:
{"count":1204,"url":"http://mashable.com/2012/01/21/top-10-tech-this-week-13/"}
Twitter hasn't released any developer APIs for analytics based on links (assuming you're only interested in links that are wrapped by the t.co wrapper). You can look at the existing documentation but it's not very good.
I don't believe there will be any API for getting the number of tweets that link to an arbitrary url.
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.