flybug
V2EX  ›  问与答

用python写的发推脚本总出错,求帮助

  •  
  •   flybug · Feb 11, 2011 · 6629 views
    This topic created in 5746 days ago, the information mentioned may be changed or developed.
    代码在这里:
    oauth.py http://codepad.org/IbckT5JS
    twitter.py http://codepad.org/PMsrIZye

    错误信息如下:
    {"request":"\/1\/statuses\/update.json","error":"Incorrect signature"}

    测试环境:ubuntu 10.10 + python 2.6.6

    注:已经连上了vpn
    4 replies  •  1970-01-01 08:00:00 +08:00
    darasion
    darasion
    Feb 11, 2011
    1
    我记得好像那些签名参数如果用 header 发了就不用在 url 中再发了。
    如果再发就重复了。
    flybug
    flybug
    OP
    Feb 11, 2011
    2
    @darasion:我现在的代码如下

    conn.request('POST','/1/statuses/update.json','',header)

    但是仍旧出错。
    darasion
    darasion
    Feb 11, 2011
    3
    @flybug 这样,你先把那个请求发到一个自己指定的东西里,比如保存在文件中。贴到这里。

    或者最好 twitter-development-talk 去:
    https://groups.google.com/forum/#!forum/twitter-development-talk
    flybug
    flybug
    OP
    Feb 11, 2011
    4
    @darasion 好的,我去google group看看。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4831 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 07:53 · PVG 15:53 · LAX 23:53 · JFK 02:53
    ♥ Do have faith in what you're doing.