Actionscript 3 Twitter请求返回“;“讯息”:&引用;无效或过期的令牌“&引用;代码";:89那么它是无效的还是过期的?

Actionscript 3 Twitter请求返回“;“讯息”:&引用;无效或过期的令牌“&引用;代码";:89那么它是无效的还是过期的?,actionscript-3,twitter,oauth,air,oauth-2.0,Actionscript 3,Twitter,Oauth,Air,Oauth 2.0,WTF! 使用仅应用程序身份验证构建AdobeAIR twitter搜索设备 我可以正确获得我的持票人令牌,但所有请求都会导致 HTTP/1.1 401 Unauthorized content-encoding: gzip content-length: 86 content-type: application/json; charset=utf-8 date: Wed, 19 Feb 2014 16:08:13 UTC server: tfe strict-transport-securi

WTF! 使用仅应用程序身份验证构建AdobeAIR twitter搜索设备


我可以正确获得我的持票人令牌,但所有请求都会导致

HTTP/1.1 401 Unauthorized
content-encoding: gzip
content-length: 86
content-type: application/json; charset=utf-8
date: Wed, 19 Feb 2014 16:08:13 UTC
server: tfe
strict-transport-security: max-age=631138519

{"errors":[{"message":"Invalid or expired token","code":89}]}
那么,它是什么,无效还是过期

我注意到,在我的无记名令牌的响应头中有一个值为Tue,1981年3月31日05:00:00 GMT的“expires”头 这是否适用于承载令牌本身

这些模棱两可的错误消息让我(我相信还有很多其他开发人员)非常悲痛

当我们收到此消息时,如何使用承载令牌调试请求


请帮助…任何人!!!!!!!在地狱里

您是否停留在流程的第3步

另请参见常见错误案例,您的令牌似乎无效


为了获得进一步的帮助,我们建议使用发布您的问题,我们很少在这里发布,但每天都会在我们的开发人员网站上监视问题。

我也遇到了同样的问题,我通过这样做可以解决问题:

GET /1.1/search/tweets.json?q=sochi HTTP/1.1
Host: api.twitter.com
Accept-Language: en-us
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/533.19.4 (KHTML, like Gecko) AdobeAIR/3.9
Accept: */*
Referer: app:/TweetMasher700.swf
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
Connection: keep-alive
x-flash-version: 11,9,900,117
Cookie: xxxxxxxxxxxxxxxxxxxxx
Authorization: Bearer xxxxxxxx==
Proxy-Connection: keep-alive
Accept-Encoding: gzip, deflate
consumer_key = "put here your API key"
consumer_secret = "put here your API secret"

access_token = "put here your access token" ##remember to put the "-" that separete your owener ID and your token
access_token_secret = "put here your token secret"

auth = twitter.oauth.OAuth(access_token, access_token_secret, consumer_key, consumer_secret)

将消费者密钥和机密与令牌访问和secreat分开非常重要,因为许多人混淆了授权和访问令牌,使twitter平台拒绝您的访问。

是的,第3步,并在twitter讨论中发布,但此处流量更大,我的整个原始请求都是常见错误情况:使用不正确或已撤销的承载令牌。好的所以现在我必须确定它是“不正确”还是被撤销。必须有更好的方法来检查承载令牌的有效性,无论是在base64编码之前还是之后!我对我的授权头所做的只是“Authorization”,“bearrier”+。我还注意到在我的cookie中返回了3个值,并设置了外部\u referer\u twitter\u sess guest\u id。这看起来正确吗?