mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-04-05 03:12:29 -04:00
Updated to Tweepy V4.5.0
This commit is contained in:
parent
7c85ceced1
commit
8e95843634
@ -136,7 +136,7 @@ class Session(base.baseSession):
|
|||||||
if self.settings["twitter"]["user_key"] != None and self.settings["twitter"]["user_secret"] != None:
|
if self.settings["twitter"]["user_key"] != None and self.settings["twitter"]["user_secret"] != None:
|
||||||
try:
|
try:
|
||||||
log.debug("Logging in to twitter...")
|
log.debug("Logging in to twitter...")
|
||||||
self.auth = tweepy.OAuthHandler(appkeys.twitter_api_key, appkeys.twitter_api_secret)
|
self.auth = tweepy.OAuth1UserHandler(appkeys.twitter_api_key, appkeys.twitter_api_secret)
|
||||||
self.auth.set_access_token(self.settings["twitter"]["user_key"], self.settings["twitter"]["user_secret"])
|
self.auth.set_access_token(self.settings["twitter"]["user_key"], self.settings["twitter"]["user_secret"])
|
||||||
self.twitter = tweepy.API(self.auth)
|
self.twitter = tweepy.API(self.auth)
|
||||||
self.twitter_v2 = tweepy.Client(consumer_key=appkeys.twitter_api_key, consumer_secret=appkeys.twitter_api_secret, access_token=self.settings["twitter"]["user_key"], access_token_secret=self.settings["twitter"]["user_secret"])
|
self.twitter_v2 = tweepy.Client(consumer_key=appkeys.twitter_api_key, consumer_secret=appkeys.twitter_api_secret, access_token=self.settings["twitter"]["user_key"], access_token_secret=self.settings["twitter"]["user_secret"])
|
||||||
@ -158,7 +158,7 @@ class Session(base.baseSession):
|
|||||||
if self.logged == True:
|
if self.logged == True:
|
||||||
raise Exceptions.AlreadyAuthorisedError("The authorisation process is not needed at this time.")
|
raise Exceptions.AlreadyAuthorisedError("The authorisation process is not needed at this time.")
|
||||||
else:
|
else:
|
||||||
self.auth = tweepy.OAuthHandler(appkeys.twitter_api_key, appkeys.twitter_api_secret)
|
self.auth = tweepy.OAuth1UserHandler(appkeys.twitter_api_key, appkeys.twitter_api_secret)
|
||||||
redirect_url = self.auth.get_authorization_url()
|
redirect_url = self.auth.get_authorization_url()
|
||||||
webbrowser.open_new_tab(redirect_url)
|
webbrowser.open_new_tab(redirect_url)
|
||||||
self.authorisation_dialog = authorisationDialog()
|
self.authorisation_dialog = authorisationDialog()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user