我正在使用Google Plus API显示墙贴(Stream)数据。 我有有效的客户端ID + API_KEY。无法在浏览器中访问Google Plus API
我可以从Google Plus云端console.i.e获得回应。通过执行方法我得到类似
请求
GET https://www.googleapis.com/plus/v1/people/myuserid/activities/public?maxResults=5&key= {YOUR_API_KEY}
X-JavaScript的用户代理:谷歌API浏览器
响应
200 OK
显示标题 -
{ “种”: “加#activityFeed”, “ETAG”: “\” Mwea3qudNDf-hWWlPWi3n-YrU1Q/ovxXa0lmTRbwzkDa9o_iJ2pdFBs \ “”, 的 “nextPageToken”: “CAIQgIi2z8bDugIgASgB”, “称号”:“ Google+收藏活动列表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”, “演员”:{ “ID”: “116100754354787768146”, “显示名”: “名字”, “URL”: “https://plus.google.com/userid”, “形象”:{ “URL”: “someurl” } }, “动词”: “后”, “对象”:{ “的objectType”: “注意”, “内容”: “”, “URL”: “https://plus.google.com/userid/posts/bYSPSVjXCXL”, “回复”:{ “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我得到了来自浏览器这样的事情
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured"
}
],
"code": 403,
"message": "Access Not Configured"
}
}
我哪里错了?!如何从浏览器获得正确的响应。 ?因为我想解析它们并在我的应用程序中使用这些数据。
注意:Google + API已打开。
我有同样的问题你有工作吗?一些示例代码? – Nanoc
不,还没有。我检查CLIENT_ID + API_KEY。没有问题,如果你使用PHP aur JAVA,你必须在Google App Engine中注册你的应用程序(来自Google +开发人员社区)。应该有一些问题与OAuth 2.0 Authentication.i正在处理该问题。您可以按照http://stackoverflow.com/questions/19352669/google-domains-api-v1-error-403-access-not-configured答案乔安娜。好运! –
最后,我结束了使用OAuth2.0 Playground :)) –