Spaces:
Runtime error
Runtime error
import os | |
import tweepy | |
BEARER_TOKEN = os.environ.get("BEARER_TOKEN") | |
CONSUMER_KEY = os.environ.get("CONSUMER_KEY") | |
CONSUMER_SECRET = os.environ.get("CONSUMER_SECRET") | |
ACCESS_TOKEN = os.environ.get("ACCESS_TOKEN") | |
ACCESS_TOKEN_SECRET = os.environ.get("ACCESS_TOKEN_SECRET") | |
client = tweepy.Client( | |
bearer_token=BEARER_TOKEN, | |
consumer_key=CONSUMER_KEY, | |
consumer_secret=CONSUMER_SECRET, | |
access_token=ACCESS_TOKEN, | |
access_token_secret=ACCESS_TOKEN_SECRET, | |
) | |
response = client.create_tweet( | |
text="This was tweeted by the Space" | |
) | |