2014-02-19 83 views
0

WTF! 使用应用程序唯一身份验证构建Adobe AIR twitter搜索设备。
https://dev.twitter.com/docs/auth/application-only-auth

我可以正确得到我的承载令牌,但所有请求导致Twitter请求返回“消息”:“无效或过期的令牌”,“代码”:89那么它是无效还是过期?

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的'expires'标题,1981年3月31日05:00:00 GMT 这是否适用于持票人标记本身?

这些模棱两可的错误消息正在给我(我敢肯定很多其他开发人员)GRIEF TONS!

当我们收到这个消息时,我们如何调试与持票人令牌的请求?

请帮忙......任何人!!!!!!!在奥阿斯地狱!

回答

0

您是否卡在https://dev.twitter.com/docs/auth/application-only-auth的过程的第3步?

另请参见常见错误情况,似乎您的令牌无效。

如需进一步的帮助,我们建议您使用https://dev.twitter.com/discussions来发布您的问题,我们很少来这里,但每天都会在我们的开发者网站上监控问题。

+0

是第3步,发布在twitter讨论区,但更多的流量在这里,我的整个RAW请求高于 –

+0

https://dev.twitter.com/discussions/26260 –

+0

常见错误案例:使用不正确的或撤销的不记名令牌。精细。所以现在我必须确定它是不正确的还是撤销的。在base64编码之前或之后,必须有更好的方法来检查承载令牌的有效性!我为我的授权标题完成的所有操作都是“授权”,“承载”+ 。 –

0
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 
0

我有同样的问题,我是能够解决的问题,这样做:

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 plataform拒绝您的访问。

相关问题