Google Buzz получает данные пользователя из фида - PullRequest
0 голосов
/ 31 августа 2011
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

1 Ответ

1 голос
/ 01 сентября 2011

Вам нужно использовать OAuth. Вы не можете просто сделать неаутентифицированный HTTP-запрос к API. См. Документацию по авторизация для API. Кроме того, ключевым параметром должен быть ключ разработчика, полученный из API Console .

...