twitter api returning too few tweets
I am trying to produce a PHP class for interactions with the twitter api (I realise there are some in the wild, but I like to do things my way). The problem I have is the number of tweets returned is one less than expected after 2. So if I ask for one, I get one; if I ask for two, I get two; if I ask for three, I get two; if I ask for four, I get three; five produced four and so. I have tested up to eleven.
Here is the query code:
$callback = new SimpleXMLElement($this->api_method, NULL, TR开发者_JAVA技巧UE);
and this is what is returned if I log $this->api_method
:
http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=mildfuzz&count=3
Count number behaves as expected throughout.
This is because some of the tweets are being ignored as they aren't important enough to be included in the indexing process.
Twitter competition ~ saving tweets (PHP & MySQL) Is the question that I had concerning this. It turns out that at least with the search api they will not return all the tweets as some are not good enough to be indexed. So this might be why you are missing some out.
I would link the Twitter docs here with the article about the Twitter search api restrictions, but Twitter has since been banned at my work, sorry. Have a google for it :)
精彩评论