-2
<?php
      var request = gapi.client.plus.people.get({
          'userId' : 'me'
        });
        request.execute(function(resp) {
          console.log('ID: ' + resp.id);
          console.log('Display Name: ' + resp.displayName);
          console.log('Image URL: ' + resp.image.url);
          console.log('Profile URL: ' + resp.url);
        });
        $optParams = array('maxResults' => 5);
        $results = $plus->people->search('Brett', $optParams);
        foreach ( $results['items'] as $result ) {
          print "ID: {$result['id']}\n<br>";
          print "Display Name: {$result['displayName']}\n<br>";
          print "Image Url: {$result['image']['url']}\n<br>";
          print "Url: {$result['url']}\n<br>";
        }
        $optParams = array('maxResults' => '20');
        $plusoners = $plus->people->listByActivity(
            "z12gtjhq3qn2xxl2o224exwiqruvtda0i", "plusoners", $optParams);
        foreach($plusoners['items'] as $person) {
          print "{$person['displayName']} +1'ed the post\n";
        }
?>
rollstuhlfahrer
  • 3,988
  • 9
  • 25
  • 38
  • Be sure to format your code correctly. Indenting with four spaces, or highlighting the code section and pressing the `{}` button should do that for you. – tadman Mar 26 '18 at 18:01

1 Answers1

0

From the Google API Support page:

What is changing with the Google+ Hangouts API?

The Google+ Hangouts API is no longer supported. New apps cannot be created but existing apps will continue to run until April 25th, 2017. After that date, apps in Hangouts will no longer function. (Source)

How to fix?

There is no fix. The only thing you can do is wait for google to release a new api.

rollstuhlfahrer
  • 3,988
  • 9
  • 25
  • 38