Last active
August 2, 2022 18:44
-
-
Save breqdev/54bc34f4dd0b136b7e8a054dec8249e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from dotenv import load_dotenv | |
import tweepy | |
load_dotenv() | |
handler = tweepy.OAuth1UserHandler( | |
os.getenv("TWITTER_CLIENT_KEY"), os.getenv("TWITTER_CLIENT_SECRET"), callback="oob" | |
) | |
print(handler.get_authorization_url()) | |
verifier = input("Verifier: ") | |
token, secret = handler.get_access_token(verifier) | |
print(f"Token: {token}") | |
print(f"Secret: {secret}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment