How to find the userID or Screen Name of a given tweetID

python
tweepy

#1

Hi, how can I get the Screen name of a user that make the tweet which appear in my home time line. pls see ??? in the code.

import tweepy
import time
from tweepy import OAuthHandler
 
consumer_key = ''
consumer_secret = ''
access_token = '
access_secret = '
 
auth = OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_secret)
 
api = tweepy.API(auth)
if(api.verify_credentials):
    print 'We sucessfully logged in'

while True:
     try:
        timeline = api.home_timeline(screen_name="McDonals", include_rts=True, count=3200)
       for tweet in timeline:
           print("Screen name of the user that make the tweet",.????????????????????:?)
           print ("Text:", tweet.text)
           print ("Created:", tweet.created_at)
     except:
           print 'We got a timeout ... Sleeping for 15 minutes'
       time.sleep(15*60)

#2

Please at least read a little bit documentation before asking these things here.
Have a look at https://dev.twitter.com/overview/api/tweets for an overview about the fields present in a Tweet.


#3

Thank you , I have already found it. but I am still struggling with this