I can't seen to get a list of tweets when calling the get_user_timeline() function. I always get None in return every time.

Maybe I'm not understanding the function but for example when I try calling it for testing in the Python Shell:

>>>from helpers import get_user_timeline
>>>list_tweets = get_user_timeline('@hillaryclinton')
<class 'NoneType'>                       #Get None for every @username

Any help would be appreciated.

1 Answer 1


Try it without the '@' prefix. get_user_timeline calls twitter.lookup_user(). The example in the twitter API doc shows screen_name without the '@' in the example.

  • Thanks, this solve my problem.
    – tadm123
    Jan 2, 2017 at 3:51
  • This about drove me insane! Maybe I wasn't reading well but I didn't see that in the instructions. Feb 13, 2017 at 1:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .