Share this article:

During a recent site build, we were frustrated that there weren’t any simple Google Plus recent post feeds out there. So, we decided to create one ourselves! We are such a loving bunch of peeps that we thought we’d share it with you guys too.

Firstly, you need to log into (and sign in if you haven’t already) the Google Developers API console Set up a new API project for our Google Plus feed and get a shiny new Developer Key.

You also need to download Google_Client.php and save it locally on your site:

And do the same for Google_PlusService.php:

Then add the following PHP code in place where you want the latest post widget:


$client = new Google_Client();

$plus = new Google_PlusService($client);
$optParams = array(‘maxResults’ => 1);
$activities = $plus->activities->listActivities(“ENTER_YOUR_G+_ID_HERE”, “public”, $optParams);

$output = ”;
foreach($activities[‘items’] as $activity){
$output .= ‘<p>’ . $activity[‘title’] . ‘</p>’;
#return print_r($activities[‘items’], true);
return $output;

This just prints out the latest post in a <p> tag. You can change the amount of posts it returns by changing the number in (‘maxResults’ => 1);.

Here’s a simple example of how we have used it in a widget on a website we have recently developed:

Simple as that!

As a highly trained team of web developers, Adao* are market leaders in providing any custom programming or website development. Feel free to contact us now to discuss your requirements.

Share this article: