Próbuję pobrać dane z Twittera za pomocą Tweepy, używając poniższego kodu, ale zwracam błąd 401 i regeneruję dostęp i tajne tokeny, i pojawił się ten sam błąd.401 Błąd podczas pobierania danych z Twittera za pomocą Tweepy
#imports
from tweepy import Stream
from tweepy import OAuthHandler
from tweepy.streaming import StreamListener
#setting up the keys
consumer_key = 'xxxxxxx'
consumer_secret = 'xxxxxxxx'
access_token = 'xxxxxxxxxx'
access_secret = 'xxxxxxxxxxxxx'
class TweetListener(StreamListener):
# A listener handles tweets are the received from the stream.
#This is a basic listener that just prints received tweets to standard output
def on_data(self, data):
print (data)
return True
def on_error(self, status):
print (status)
#printing all the tweets to the standard output
auth = OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_secret)
stream = Stream(auth, TweetListener())
t = u"#سوريا"
stream.filter(track=[t])
Czy autoryzowałeś aplikację na swoim koncie twitter? [pomocy łącza] [1] [1]: http://stackoverflow.com/questions/19095257/using-twython-to-send-a-tweet-twitter-api-error/19196583 # 19196583 –
Niestety, wciąż mam ten sam błąd. – user3643380
Próbowałem również sprawdzić logowanie za pomocą pola twitter, ale bezużyteczne. Jakaś pomoc !!! – user3643380