有没有办法使用Twitter API计算特定用户的Twitter推文?

时间:2011-02-02 15:40:30

标签: php api twitter

是否有任何想法或方法或代码(PHP)使用Twitter API查找特定用户的推文数量?

2 个答案:

答案 0 :(得分:6)

有一种方法,你需要使用users / show资源,
你可以找到文件here 这是一个output example

更准确地说,您正在寻找statuses_count


这是从文档页面

中截取的截断输出
{
"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,
[...]

答案 1 :(得分:1)

因为你一次只能返回200,我认为你不能。

更多信息:http://blog.twostepmedia.co.uk/retrieve-tweets-using-php-and-json/