import simplejson
import httplib2
import twitter
api = twitter.Api(consumer_key='consumer key', consumer_secret='consumer secret', access_token_key='access token', access_token_secret='token secret')
timeline = api.GetHomeTimeline('@username', count=20, since_id=None, max_id=None, trim_user=False, exclude_replies=False, contributor_details=False, include_entities=True)
print [s.text for s in statuses]
0
votes
Please share the full traceback for that error.
- Martijn Pieters
Forgive me, but I am new to coding and needed an answer to the error I am receiving "TypeError: GetHomeTimeline() got multiple values for keyword argument 'count'" I am trying to use the Twitter-tools library to retrieve my timeline
- MaxxABillion
Yes, and in order for us to help you better, I want you to add the full traceback for that exception.
- Martijn Pieters
How would I find out the full traceback?
- MaxxABillion
Looking at the library source code I already figured out what the API expects.
- Martijn Pieters
1 Answers
0
votes
The GetHomeTimeline() method doesn't take a username; it return tweets for the current authenticated user. Remove the first parameter:
timeline = api.GetHomeTimeline(count=20, since_id=None, max_id=None, trim_user=False, exclude_replies=False, contributor_details=False, include_entities=True)
print [s.text for s in timeline]