如何创建Twitter应用程序
import tweepy
# Create variables for each key, secret, token
consumer_key = 'your_consumer_key'
consumer_secret = 'your_consumer_secret'
access_token = 'your_access_token'
access_token_secret = 'your_access_token_secret'
# Set up OAuth and integrate with API
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)
# Write a tweet to push to our Twitter account
tweet = 'Hello, world!'
api.update_status(status=tweet)