0

How to post a comment or reply to a comment by using the google+ API?

I tried this:

$service = new Google_Service_PlusDomains($client);

try {

    $activity = new Google_Service_PlusDomains_Activity();
    $activity->setObject($text);
    $activity->setActor($this->id);
    $activity->setTitle($text);

    $reply = $service->activities->insert('me',$activity);

} catch (Exception $e) {
    print 'An error occurred: ' . $e->getMessage();
}

But it is not working, no comment or post is sent.

spenibus
  • 4,339
  • 11
  • 26
  • 35
G.E
  • 1
  • 2

0 Answers0