Receive messages from a Google + page

I would like to receive content (messages) on google + and post it on my website as a feed. Is there any information like?

I read that the current API does not allow this, but these topics have been from last year.

Thank.

+5
source share
3 answers

After a while I found it.

http://code.google.com/p/google-plus-php-starter/

and this one

https://developers.google.com/+/api/latest/activities/list

The only problem is that for this you need to log in to your Google app. Any preconceptions will be appreciated.

+2
source

activity.list , "" API , Google+. API , .

" API" API. , :

<?
    $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>

, , Google+ PHP.

+10

When updating the correct answer, the class name changed to Google_Service_Plus

<?php
    set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ .'/vendor/google/apiclient/src');
    require_once __DIR__.'/vendor/autoload.php';

    $client = new Google_Client();
    $client->setDeveloperKey("YOUR_API_KEY");
    $plus = new Google_Service_Plus($client);
    $activities = $plus->activities->listActivities("+GooglePlusDevelopers", "public");
?>

$items = $activities->getItems();
foreach($items as $item) {

   $object = $item->getObject();
?>

<div class="gpost">
   <p><?php echo $object->getContent(); ?></p>
   <a href="<?php echo $item['url']; ?>">Read more</a>
</div>

<?php } ?>
+2
source

All Articles