-
1 votesanswersviews
如何在Python 2.7上运行Twython
我正在尝试制作一个类似的twitterbot:(http://www.makeuseof.com/tag/how-to-build-a-raspberry-pi-twitter-bot/) 我从剧本回来了: root@raspberrypi:/home/pi# sudo python SillyTweeter.py 回溯(最近一次调用最后一次):文件“SillyTweeter.py”,第11行... -
0 votesanswersviews
无法使用Twython上传视频
我一直在尝试使用Twython将mp4视频上传到twitter . 但“Upload_video”API返回400错误请求错误 . 下面是我的代码和错误消息 . 我的Python脚本 moviefile='/xxx/xxxx/xxx/xxx/xx.mp4' video=open(moviefile, 'rb') response=`api.upload_video(media=vid... -
2 votesanswersviews
ImportError:没有名为requests_oauthlib的模块
试着在我的Raspberry Pi上发推文 . 安装Twython和oauthlib没有问题 . 但无法通过此错误: 回溯(最近一次调用最后一次):文件“tweet_test.py”,第3行,来自twython import Twython 文件“/usr/lib/python2.7/dist-packages/twython/ init .py”,第23行,来自.api import Twy... -
1 votesanswersviews
twython upload_profile_image图像参数丢失
我正在编写一个简短的python脚本来使用twython API: #!/usr/bin/python import sys from twython import Twython #encryption info consumerKey = '' consumerSecret = '' accessToken = '' accessTokenSecret = '' #create instanc... -
3 votesanswersviews
Twython OAuth1使用示例代码发出401错误
我'm trying to setup a stream using the latest version of Twython with Python 2.7.3. I' m试图重现streaming docs中依赖于OAuth1 docs的例子 . 使用以下代码产生401错误,直到我终止执行: from twython import Twython from twython import Tw... -
1 votesanswersviews
使用twython-django登录Twitter
我希望用户可以选择使用他的Twitter帐户登录以获取他的时间表 . 我正在使用twython-django包 . 这是我的代码views.py def login(request): twitter = Twython(settings.TWITTER_KEY, settings.TWITTER_SECRET) # Request an authorization url to send th... -
0 votesanswersviews
我可以从我的Twython回调处理程序中创建一个返回状态为500的httplib POST请求吗?
在我的twitter回调处理程序中,我似乎无法发出httplib POST请求,因为它会抛出一个不相关的401 Token Invalid Expired错误 . 我正在使用Google App Engine并尝试了urlfetch功能 . `headers = {“Content-type”:“application / x-www-form-urlencoded”,“Accept”:“text... -
1 votesanswersviews
Twython:如何更新 Profiles Banner ?
我究竟做错了什么? twitter = twython.Twython(api_key, api_secret, access_token, token_secret) banner_file = open('banner.jpg', 'rb') twitter.update_profile_banner_image(banner=banner_file) 调用此返回: Traceback(... -
0 votesanswersviews
在Twython中获取访问令牌错误401
我试图通过Twython来验证用户的Twitter帐户 def twitter_view(request): twitter = Twython(APP_KEY, APP_SECRET) auth = twitter.get_authentication_tokens(callback_url='http://127.0.0.1:8000/confirm/', force_login=True) ...