简体   繁体   English

检索完整的Twitter时间轴

[英]Retrieve complete Twitter timeline

we are working on a PHP webservice which is intended to retrieve a user's twitter timeline. 我们正在开发一个PHP网络服务,旨在检索用户的Twitter时间轴。 Now comes the problem, this is the URL we use: "http://api.twitter.com/1/statuses/user_timeline/$user.json?count=$num&include_rts=1 where $user is the user (^_^) and count the number of tweets to retrieve but it only shows me the tweets generated by the user or the ones reteeted by him. I need ALL tweets that appear on his timeline, means the one he tweets and the ones people he is following tweets. Is there any parametermissing in the URL above or do I have to use another method instead? Thanks in adavance. 现在出现了问题,这是我们使用的URL:“ http://api.twitter.com/1/statuses/user_timeline/$user.json?count=$num&include_rts=1,其中$ user是用户(^ _ ^ )并计算要检索的推文的数量,但只显示我由用户生成的推文或由他发回的推文。我需要他的时间轴上显示的所有推文,即他发的推文和他关注的推文的人。上面的网址中是否缺少任何参数,或者我必须使用另一种方法代替吗?

I answered a very similar question, it would apply in your case too.. 我回答了一个非常类似的问题,它也适用于您的情况。

use Twitter Counter as Twitter only supplies you with numbered ID's rather then detailed info about followers. 使用Twitter计数器,因为Twitter仅向您提供编号的ID,而不是有关关注者的详细信息。

Counting a Group of Twitter Users' Followers 计算一组Twitter用户的关注者

MyAccount > MyFollowersAccount > followers_count MyAccount> MyFollowersAccount> followers_count

What I would do is this, 我会做的是

run the Twitter API method GET followers/ids 运行Twitter API方法GET followers / ids

https://api.twitter.com/1/followers/ids.json?cursor=-1&screen_name=twitterapi https://api.twitter.com/1/followers/ids.json?cursor=-1&screen_name=twitterapi

to get the ID's of the followers of screenname X 获取屏幕名称X的关注者的ID

and then switch over to Twitter Counter which will give you a more detailed list and information about the followers, followers specifically. 然后切换到Twitter计数器,它将为您提供有关关注者(尤其是关注者)的更详细的列表和信息。 Also, this could be a way to split up the two calls so you won't be blocked by a rate limit problem on one end. 另外,这可能是拆分两个呼叫的一种方法,因此不会在一端受到速率限制问题的干扰。

http://twittercounter.com/pages/api?ref=footer http://twittercounter.com/pages/api?ref=footer

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM