0
需要使用tweepy
進口tweepy 進口時間reteive retweeters ID,JSON檢索retweeters ID
APP_KEY=""
APP_SECRET=""
OAUTH_TOKEN=""
OAUTH_TOKEN_SECRET=""
auth = tweepy.OAuthHandler(APP_KEY,APP_SECRET)
auth.set_access_token(OAUTH_TOKEN,OAUTH_TOKEN_SECRET)
api = tweepy.API(auth)
'''for status in api.user_timeline(screen_name='acmigdtuw',include_rts=1,count=200):
print status.id'''
firstTweet = api.user_timeline(screen_name="acmigdtuw")[0]
print firstTweet.text
print firstTweet.id
#results = api.retweets(status.id,cursor=-1,stringify_ids=1)
pl = api.retweets.id(id=firstTweet.id)
print pl[0]['user']['screen_name']
嘗試'PL = api.retweets(firstTweet.id)'即下 - 最後一線。然後將最後一行更改爲'print pl'將打印'862193390158532608' – davedwards
thankx @downshift回覆:實際上我想打印所有retweeters的id,我如何實現這一點?請幫助...我試過你的解決方案,它給了我詳細的細節。 – vasu