I want to print the time which a User follow another user



How can I print the followed event time, this is what I have but I am getting no output

from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream

#Twitter API credentials
consumer_key = ''
consumer_secret = ''
access_token = ''
access_secret = ''

class StdOutListener(tweepy.StreamListener):
    """ A listener handles tweets that are received from the stream.
    This is a basic listener that just prints received tweets to stdout.
    def on_event(self, event):
            if event.event == 'follow':
            time = event.created_at
            source_user = event.source
            target_user = target_user
            some_process(time, sousrce_user, target_user)
if __name__ == '__main__':
    l = StdOutListener()
    auth = OAuthHandler(consumer_key, consumer_secret)
    auth.set_access_token(access_token, access_secret)
    stream = tweepy.Stream(auth, l)

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

Please ask a proper question, describing exactly what you are trying to do, format your question nicely. Use fenced code block for code. If you don’t know how to do this, please check this Forum help, as else your question is really unreadable and it’s unlikely you will get any answers.


Sorry, I hope my question is now clear