import tweepy # Consumer keys and access tokens, used for OAuth consumer_key = '*****' consumer_secret = '*****' access_token = '*****' access_token_secret = '*****' # OAuth process, using the keys and tokens auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token, access_token_secret) # Creation of the actual interface, using authentication api = tweepy.API(auth) # Sample method, used to update a status api.update_status("Hello Python Central!")
Возникает ошибка:
Traceback (most recent call last):
File “C:\Users\Alexey\Desktop\twitter.py”, line 17, in <module>
api.update_status(“Hello Python Central!”)
File “C:\Python34\lib\site-packages\tweepy-3.3.0-py3.4.egg\tweepy\api.py”, line 193, in update_status
)(post_data=post_data, *args, **kwargs)
File “C:\Python34\lib\site-packages\tweepy-3.3.0-py3.4.egg\tweepy\binder.py”, line 239, in _call
return method.execute()
File “C:\Python34\lib\site-packages\tweepy-3.3.0-py3.4.egg\tweepy\binder.py”, line 223, in execute
raise TweepError(error_msg, resp)
tweepy.error.TweepError: Twitter error response: status code = 400
Как правильно работать с Твипи? В чем заключается ошибка? Хочу просто создать пост с помощью Python.