1

I am not a very avid user and hence having a hard time figuring out what each field means in twitter api response. Going thru documentation has only resulted in me going in circles.

What I am trying to do is analyzing how things go viral. So, what I did was grabbed data from twitter streaming api with hope of analyzing the response but I am totally confused. So a sample json response is :

{"created_at":"Thu Mar 14 18:19:12 +0000 2013","id":312266679390457857,"id_str":"312266679390457857","text":"The first four winners of our March Madness Giveaway (4x ADATA Technology (USA) 16GB DashDrives) are:\n\nAaron... http:\/\/t.co\/ikPbfRZQdq","source":"\u003ca href=\"http:\/\/www.facebook.com\/twitter\" rel=\"nofollow\"\u003eFacebook\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":179622147,"id_str":"179622147","name":"Levetron","screen_name":"Levetron","location":"Los Angeles","url":"http:\/\/www.aziocorp.com","description":"Official Twitter for Levetron by AZiO. Here for customer questions, gaming tips & tricks, sharing cool ideas, product launch releases, reviews and more!","protected":false,"followers_count":1042,"friends_count":25,"listed_count":4,"created_at":"Tue Aug 17 18:56:29 +0000 2010","favourites_count":5,"utc_offset":-28800,"time_zone":"Pacific Time (US & Canada)","geo_enabled":false,"verified":false,"statuses_count":707,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"131516","profile_background_image_url":"http:\/\/a0.twimg.com\/images\/themes\/theme14\/bg.gif","profile_background_image_url_https":"https:\/\/si0.twimg.com\/images\/themes\/theme14\/bg.gif","profile_background_tile":true,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/3223061028\/999ac6efc782d85983cbcf7f2deab7c1_normal.png","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/3223061028\/999ac6efc782d85983cbcf7f2deab7c1_normal.png","profile_banner_url":"https:\/\/si0.twimg.com\/profile_banners\/179622147\/1360294489","profile_link_color":"009999","profile_sidebar_border_color":"EEEEEE","profile_sidebar_fill_color":"EFEFEF","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"entities":{"hashtags":[],"urls":[{"url":"http:\/\/t.co\/ikPbfRZQdq","expanded_url":"http:\/\/fb.me\/M6YPCk9W","display_url":"fb.me\/M6YPCk9W","indices":[112,134]}],"user_mentions":[]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"filter_level":"medium"}

1)My guess is if this tweet is a result of a retweet then "retweeted" should be true. But how do i figure out from which user it was retweeted? 2) Is "id" user id or tweet id?

Basically, if lets say I want to analyze how (say) Gangham style went viral.. who retweeted/followed that particular tweet, how should i do this?

Also, has twitter recently changed its api. I am using python for this but looks to me that all of those api's examples are not working

For example: https://github.com/tweepy/tweepy

Any suggestions. Thanks

4

1 回答 1

1

请参阅与推文相关的 Twitter API文档。它描述了 Twitter JSON 响应中返回的所有参数。

该推文没有被转发,因为retweeted设置为 false 并且retweeted_count为 0。

从文档中:

id = 此推文的唯一标识符的整数表示。

通过 retweeted_status 属性的存在,可以将转推与典型的推文区分开来。此属性包含被转发的原始推文的表示。

此外,这里是受支持的 twitter 库的列表。除了列出的 tweepy 之外,还有其他几个可能对您有用的库。

于 2013-05-01T18:28:27.963 回答