Twitter API 1.1无法对您2进行身份验证
Twitter API 1.1 Could not authenticate you 2
我正在尝试从这个查询中获取结果。
https://api.twitter.com/1.1/search/tweets.json?q=?&geocode=39.893280,32.779655,5km&count=100
我收到code:32 Could not authenticate you
错误。我正在使用解析云代码。
Parse.Cloud.httpRequest({
method: 'GET',
url: urlLink,
headers: {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization" : 'OAuth oauth_consumer_key="hKHVs8mDhW1rvZaPSLV9NywDS", oauth_nonce="5930fc59da48a2b30a5ff90939184b82", oauth_signature=somethingcorrect, oauth_signature_method="HMAC-SHA1", oauth_timestamp="1427745599", oauth_token="2900478017-RUQFnvSL7Vh1WohOBLbkswx55vtcgbnaexNt6ed", oauth_version="1.0"'
},
body: {
},
success: function(httpResponse) {
// console.log(httpResponse.text);
response.success(httpResponse.text);
},
error: function(httpResponse) {
response.error('Request failed with response ' + httpResponse.status + ' , ' + JSON.stringify(httpResponse));
}
});
我从这里创造了一切。所以钥匙和签名是正确的。可能我提供的urlLink格式错误,但我检查了几次。这里怎么了?
这是正确工作的curl代码。换行只是为了更好的可读性。
curl --get 'https://api.twitter.com/1.1/search/tweets.json'
--data 'count=100&geocode=39.893280%2C32.779655%2C5km&q=%3F'
--header 'Authorization: OAuth oauth_consumer_key="hKHVs8mDhW1rvZaPSLV9NywDS", oauth_nonce="5930fc59da48a2b30a5ff90939184b82", oauth_signature=somethingcorrect, oauth_signature_method="HMAC-SHA1", oauth_timestamp="1427745599", oauth_token="2900478017-RUQFnvSL7Vh1WohOBLbkswx55vtcgbnaexNt6ed", oauth_version="1.0"' --verbose
问题不是?
,而是我应该写%3F
这是查询的最新版本
https://api.twitter.com/1.1/search/tweets.json?q=%3F&geocode=39.893280,32.779655,5km&count=100
文件:https://dev.twitter.com/rest/reference/get/search/tweets
q: UTF-8、URL编码的搜索查询,最多500个字符,包括运算符
相关文章:
- Twitter API 1.1无法对您2进行身份验证
- javascript api,用于在第三方域上存储身份验证令牌
- 实施Facebook's无用户身份验证的Graph API
- 显示LinkedIn Api的个人资料数据,无需身份验证
- postmates api的AJAX中的HTTP身份验证失败
- Wordpress REST API身份验证,无需登录页面
- 如何在带有JQuery的Neo4j 2.2.x中使用事务Cypher HTTP端点和新的REST API身份验证和授权
- 如何使用不同的API's在同一个Angular JS应用程序中具有不同的身份验证标头
- Twitter搜索API身份验证错误
- 在Javascript中对API进行身份验证
- 使用基于令牌的身份验证保护Sails.js中的API路由
- AngularJS身份验证,带有一个restful api,成功时返回一个令牌
- 由于CORS的原因,无法在BigCommerce API中进行身份验证
- 使用 json 后端对 jquery-mobile 应用程序进行身份验证(制作 API)
- 从声音云 API 流式传输,无需用户身份验证
- REST API:在 Javascript SPA 中安全地处理身份验证
- 访问 Twitter API - 身份验证和骨干模型
- 保留 Azure 移动服务的自定义 API 调用的用户身份验证
- Google Plus api 调用未经身份验证
- 适用于 Angular.js 应用程序的身份验证 API