any way to count twitter tweets of a particular user using Twitter API?
Does any one have any Idea or me开发者_如何学JAVAthods or codes(PHP) to find number of tweets for a particular user using twitter API?
There is a way, you need to use the users/show resource,
you can find the documentation here
and here's an output example
more precisely, you're looking for statuses_count
Here's a truncated output taken from the documentation page
{
"name": "Twitter API",
"profile_sidebar_border_color": "87bc44",
"profile_background_tile": false,
"profile_sidebar_fill_color": "e0ff92",
"location": "San Francisco, CA",
"profile_image_url": "http://a3.twimg.com/profile_images/689684365/api_normal.png",
"created_at": "Wed May 23 06:01:13 +0000 2007",
"profile_link_color": "0000ff",
"favourites_count": 2,
"url": "http://apiwiki.twitter.com",
"contributors_enabled": true,
"utc_offset": -28800,
"id": 6253282,
"profile_use_background_image": true,
"profile_text_color": "000000",
"protected": false,
"followers_count": 160752,
"lang": "en",
"verified": true,
"profile_background_color": "c1dfee",
"geo_enabled": true,
"notifications": false,
"description": "The Real Twitter API. I tweet about API changes, service issues and happily answer questions about Twitter and our API. Don't get an answer? It's on my website.",
"time_zone": "Pacific Time (US & Canada)",
"friends_count": 19,
"statuses_count": 1858,
[...]
since you can only return 200 at a time, i dont think you can.
More info: http://blog.twostepmedia.co.uk/retrieve-tweets-using-php-and-json/
精彩评论