无法访问谷歌加API的浏览器 [英] Unable to access Google Plus API in browser
问题描述
我的工作来显示使用谷歌加API墙帖(流)的数据。
我有有效的客户端ID + API_KEY。
i am working on to display wall posts (Stream) data using Google Plus API. i have valid Client ID + API_KEY.
我能够从谷歌加云console.i.e响应。通过执行方法,我得到的东西像
I am able to get response from Google Plus cloud console.i.e. by executing method I get Something like
请求
GET的https://www.googleapis.com/plus/v1/people/myuserid/activities/public?maxResults=5&key={YOUR_API_KEY}
GET https://www.googleapis.com/plus/v1/people/myuserid/activities/public?maxResults=5&key={YOUR_API_KEY}
X-JavaScript的用户代理:谷歌API浏览器
X-JavaScript-User-Agent: Google APIs Explorer
响应
200 OK
-
显示标题 -
Show headers -
{
种:加#activityFeed
ETAG:\\Mwea3qudNDf-hWWlPWi3n-YrU1Q / ovxXa0lmTRbwzkDa9o_iJ2pdFBs \\,
的nextPageToken:CAIQgIi2z8bDugIgASgB
头衔:为收集公益活动Google+的名单,
更新:2013-11-01T12:07:44.665Z
项目:
{
种:加#活动
ETAG:\\Mwea3qudNDf-hWWlPWi3n-YrU1Q / JdSanh1QlMQ72Ubbabsiz2rP4B8 \\,
发表:2013-11-01T12:07:44.665Z
更新:2013-11-01T12:07:44.665Z
ID:ID,
URL: https://plus.google.com/userid/posts/bYSPSVjXCXL,
演员:{
ID:116100754354787768146
显示名:名字,
URL: https://plus.google.com/userid
图片: {
URL:someurl
}
},
动词:后
对象:{
的objectType:注意
内容:,
URL: https://plus.google.com/userid/posts/bYSPSVjXCXL,
回复:{
TOTALITEMS:1,
selfLink:<一个href=\"https://content.googleapis.com/plus/v1/activities/z13xulwx3qjuxnkii04cjpsqgsjlyp2j23o/comments\" rel=\"nofollow\">https://content.googleapis.com/plus/v1/activities/z13xulwx3qjuxnkii04cjpsqgsjlyp2j23o/comments\"
},
}
{ "kind": "plus#activityFeed", "etag": "\"Mwea3qudNDf-hWWlPWi3n-YrU1Q/ovxXa0lmTRbwzkDa9o_iJ2pdFBs\"", "nextPageToken": "CAIQgIi2z8bDugIgASgB", "title": "Google+ List of Activities for Collection PUBLIC", "updated": "2013-11-01T12:07:44.665Z", "items": [ { "kind": "plus#activity", "etag": "\"Mwea3qudNDf-hWWlPWi3n-YrU1Q/JdSanh1QlMQ72Ubbabsiz2rP4B8\"", "published": "2013-11-01T12:07:44.665Z", "updated": "2013-11-01T12:07:44.665Z", "id": "id", "url": "https://plus.google.com/userid/posts/bYSPSVjXCXL", "actor": { "id": "116100754354787768146", "displayName": "name", "url": "https://plus.google.com/userid", "image": { "url": "someurl" } }, "verb": "post", "object": { "objectType": "note", "content": "", "url": "https://plus.google.com/userid/posts/bYSPSVjXCXL", "replies": { "totalItems": 1, "selfLink": "https://content.googleapis.com/plus/v1/activities/z13xulwx3qjuxnkii04cjpsqgsjlyp2j23o/comments" }, }
........
似乎不错,直到now..but,当我使用请求URL即的https://www.googleapis.com/plus/v1/people/myuserid/activities/public?maxResults=5&key={MY_API_KEY}我得到了来自浏览器像这样
Seems good till now..but,when i use Request URL i.e https://www.googleapis.com/plus/v1/people/myuserid/activities/public?maxResults=5&key={MY_API_KEY} i got something from browser like this
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured"
}
],
"code": 403,
"message": "Access Not Configured"
}
}
我要去的地方错了吗?!如何从浏览器正确的反应。 ?因为我想分析它们和我的应用程序中使用这些数据。
where i am going wrong ?! how to get correct response from Browser. ? as i want to parse them and use these data in my Application.
注意:谷歌+ API是打开
推荐答案
您确保您已替换{} MY_API_KEY与已使用云端控制台生成的API密钥?
Are you making sure that you have replaced {MY_API_KEY} with the API key that you have generated using the Cloud Console?
这篇关于无法访问谷歌加API的浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!