I am trying to build a application that compares the social media activities of different twitter accounts due to their content. I tried to get some data from scratch and used the following github code (https://github.com/ScriptSmith/socialreaper)
The code is runnig and the test csv is gettin created, but it's empty.
I got the API Keys from Twitter - what else is there to consider? Could there be an error with the API from Twitter?
import socialreaper
from socialreaper import Twitter
from socialreaper.tools import to_csv
twt = Twitter(api_key='xxx',
api_secret='xxx',
access_token='xxx',
access_token_secret='xxx')
tweets = twt.user("realDonaldTrump", count=500, exclude_replies=True,
include_retweets=False)
to_csv(list(tweets), filename='trump.csv')
´´´
Aucun commentaire:
Enregistrer un commentaire