2013-06-18 20 views
0

使用python,我如何獲得轉推推文的所有用戶的數組。我發現了這一點,但不知道如何將它實現爲python。retweeters python twitter api implementation

https://dev.twitter.com/docs/api/1.1/get/statuses/retweeters/ids

這裏是我試圖

t = Twitter(auth=OAuth('....')) 
tweets = t.statuses.user_timeline.AIG_Latestnews() 

When I try this: 
pl = t.statuses.retweeters(tweets[0]['id']) 

I get an error: 
Traceback (most recent call last): 
File "<pyshell#134>", line 1, in <module> 
    reqs() 
    File "C:\Documents and  Settings\visolank\Desktop\Python\programs\twitter_travel_guard.py", line 138, in reqs 
pl = t.statuses.retweeters(tweets[0]['id']) 
TypeError: __call__() takes exactly 1 argument (2 given) 
+0

我發佈了示例代碼,用Twython做到這一點:http://stackoverflow.com/questions/17172169/difficulty-using-twitter-api-command-implementi上合蟒蛇 – chris

回答

0

想通了我自己

PL = t.statuses.retweets.id(ID = TW) 打印PL [代碼0] ['user'] ['screen_name']