【问题标题】:Odd: Twitter API v1.1 returning Error(46) "'The Twitter REST API v1 is no longer active." from a VALID 1.1 endpoint. Any body else?奇怪:Twitter API v1.1 返回错误(46)“'Twitter REST API v1 不再活动。”来自 VALID 1.1 端点。其他人?
【发布时间】:2015-04-22 21:57:07
【问题描述】:

调用 twitter api v1.1 端点时:

https://upload.twitter.com/1.1/media/uplaod.json

我收到以下错误:

message: The Twitter REST API v1 is no longer active. Please migrate to API 
v1.1. https://dev.twitter.com/docs/api/1.1/overview.
code: 64

通过带有 requests-oauthlib 的 python-requests 发出的完整请求:

POST https://upload.twitter.com/1.1/media/uplaod.json
Content-Length: 25566
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: python-requests/2.4.3 CPython/2.7.2 Windows/post2008Server
Connection: keep-alive
Content-Type: multipart/form-data; boundary=57ae35dd03714226a367e5a8268f9c5b
Authorization: OAuth oauth_nonce="<censored>", oauth_timestamp="1424492683", oauth_version="1.0", oauth_signature_method="HMAC-SHA1", oauth_consumer_key="<censored>", oauth_token="<censored>", oauth_signature="<censored>"

--57ae35dd03714226a367e5a8268f9c5b
Content-Disposition: form-data; name="media[]"; filename="4725ec4acf23d7a9a7fd92337f2b4713f746c7df.jpg"
Content-Type: application/octet-stream
<censored...binary...data>
--57ae35dd03714226a367e5a8268f9c5b--

这是今天早些时候工作的。有人可以确认这是 Twitter 的问题,我不会生气吗?

似乎https://api.twitter.com/1.1/statuses/home_timeline.json 等其他端点工作正常。

用chrome点击这个链接会报错:https://upload.twitter.com/1.1/media/uplaod.json

这是 Twitter,不是我...

【问题讨论】:

    标签: python oauth twitter-oauth python-requests twitter-rest-api


    【解决方案1】:

    您似乎调用了错误的 URL - 只是输入错误。

    相反

    https://upload.twitter.com/1.1/media/uplaod.json
    

    你应该打电话:

    https://upload.twitter.com/1.1/media/upload.json
    

    【讨论】:

    • GOOD EYE!,我什至花了一段时间才看到你发布的两行之间的区别......我最终抓住了这一点并忘记了这个问题。
    猜你喜欢
    • 1970-01-01
    • 2018-03-06
    • 1970-01-01
    • 2014-02-26
    • 1970-01-01
    • 2013-06-09
    • 1970-01-01
    • 1970-01-01
    • 2013-06-14
    相关资源
    最近更新 更多