Getting posts from google plus page

Dino Velić picture Dino Velić · Jan 31, 2013 · Viewed 9.7k times · Source

I would like to get content (posts) from a google+ page and post it to my website, as a feed. Is there any info how?

I read that current API does not allow that, but those topics were from the last year.

Thanks.

Answer

class picture class · Jan 31, 2013

You can perform activities.list, without having to authenticate, by passing your "simple" key from the API console for a project created that has the Google+ service turned on. Access to the API calls is restricted to the authorized origins you set up in your project.

After you create the project, in the section "Simple API Access" there is an API key. Build your client with this key, your client id, and client secret:

<?
    $client = new Google_Client();
    $client->setDeveloperKey("YOUR_API_KEY");
    $plus = new Google_PlusService($client);
    $activities = $plus->activities->listActivities("+GooglePlusDevelopers", "public");
?>
<html><body><pre><? echo print_r($activities);?></pre></body></html>

A final note, make sure you use the latest Google+ PHP client.