开发者

Google Buzz get user data from feed

I am trying to access the user info or user id after authenticating the user. 
I have this url I call with 
curl_init(https://www.googleapis.com/buzz/v1/people/@me/@self)
but it doesn't work. It says:
<?xml version="1.0" encoding="UTF-8"?开发者_如何学C>
<errors xmlns="http://schemas.google.com/g/2005"><error>
<domain>GData</domain>
<code>authError</code>
<location type="header">Authorization</location>
<internalReason>@me called by anonymous</internalReason></error></errors>

So I added a key at the end
curl_init(https://www.googleapis.com/buzz/v1/people/@me/@self?key="...")
But it says "Bad Request Access not Configured"..I am geting now where..
any ideas? THanks


You need to use OAuth. You can't just make an unauthenticated HTTP request to the API. See the documentation on authorization for the API. Also, the key parameter needs to be a developer key obtained from the API Console.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜