twitter转发用户id api python
将twitterapi与python结合使用,我需要知道如何获取所有转发tweet的人的所有用户id 我在这里: 但我不知道如何将其放入python中 以下是我目前的代码:twitter转发用户id api python,python,api,twitter,social-networking,Python,Api,Twitter,Social Networking,将twitterapi与python结合使用,我需要知道如何获取所有转发tweet的人的所有用户id 我在这里: 但我不知道如何将其放入python中 以下是我目前的代码: from twitter import * t = Twitter(auth=OAuth(....)) twitter = t.statuses.user_timeline.snl() twitter[0]['text'] # gets the tweet twitter[0]['retweet_cou
from twitter import *
t = Twitter(auth=OAuth(....))
twitter = t.statuses.user_timeline.snl()
twitter[0]['text'] # gets the tweet
twitter[0]['retweet_count'] # gets the number of retweets
我的下一行是什么来获取所有转发用户的ID?您应该在twitter API 1.1中使用,retweeted\u by
已被弃用且不起作用
下面是一个例子:
from twitter import *
t = Twitter(auth=OAuth(...))
tweets = t.statuses.user_timeline.snl()
for tweet in tweets:
retweets = t.statuses.retweets_of_me(since_id=str(tweet['id']), max_id=str(tweet['id']))
print retweets
希望这能有所帮助。检查此项。好了,python twitter客户端支持所有这些功能。