-1
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"?>
<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
4

1 回答 1

1

您需要使用 OAuth。您不能只向 API 发出未经身份验证的 HTTP 请求。请参阅有关API授权的文档。另外,key 参数需要是从API Console获取的开发者密钥。

于 2011-09-01T06:58:42.223 回答