Si crea quindi una app (si deve attendere che la app sia autorizzata dopo aver compilato un breve form....necessitano 24 ore per la risposta) e si copiano le chiavi consumer e access_token
per semplicita' si usera' lal libreria tweepy
-----------------------------------------------------------------------
import tweepy
consumer_key = 'oNexxxxxxxxxxxxxxxxxxxxxx'
consumer_secret = 'ti4xxxxxxxxxxxxxxxxxxxxxxxx'
access_token = '4402008xxxxxxxxxxxxxxxxxxxxxxxx'
access_token_secret = '59nofxxxxxxxxxxxxxxxxxxxxxxxxxxx'
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)
now = datetime.datetime.now()
testo = "Fir " + now.strftime("%d-%m-%Y %H:%M:%S") +"\n"
api.update_status(testo)
Nessun commento:
Posta un commento