I'm trying to read the latest posts from a g+ fanpage, using php. Alas, the documentation is not that helpful on how to do that :/
So far, I've tried the following:
<?php
$curlSession = curl_init();
curl_setopt($curlSession, CURLOPT_URL, 'https://www.googleapis.com/plus/v1/people/{userID}/activities/public?key={apikey}');
curl_setopt($curlSession, CURLOPT_BINARYTRANSFER, true);
curl_setopt($curlSession, CURLOPT_RETURNTRANSFER, true);
$jsonData = json_decode(curl_exec($curlSession));
curl_close($curlSession);
{apikey}
and {userID}
are placeholders, of course. I generated the api key via the Developers Console, neither server keys, nor browser keys make any difference to the result below. The Google+ API is activated.
This is the result:
{
"error":{
"errors":[
{
"domain":"usageLimits",
"reason":"accessNotConfigured",
"message":"Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
],
"code":403,
"message":"Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
}
Do you have any suggestions on what's going wrong? Am I missing something? Do I have to provide billing information for this kind of api request?
It tells you right in the error message whats wrong ... Please use Google Developers Console to activate the API for your project.
Go Here https://code.google.com/apis/console/, on the left click on APIs & Auth, then turn on Google+ API and what ever other APIs you need