Twitter OAuth dance works now!!1111 wuuuuhhuuuu

This commit is contained in:
b3yond 2018-04-14 18:16:05 +02:00
parent 0b41b43421
commit 898f229145

View file

@ -127,8 +127,7 @@ def twitter_callback(user):
consumer_secret = config["twitter"]["consumer_secret"] consumer_secret = config["twitter"]["consumer_secret"]
auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
request_token = user.get_request_token() request_token = user.get_request_token()
auth.request_token = {"oauth_token": request_token, auth.request_token = request_token
"oauth_token_secret": verifier}
auth.get_access_token(verifier) auth.get_access_token(verifier)
user.save_twitter_token(auth.access_token, auth.access_token_secret) user.save_twitter_token(auth.access_token, auth.access_token_secret)
return bottle.redirect("/settings") return bottle.redirect("/settings")