在Google+信息页上插入评论

时间:2015-09-04 12:50:08

标签: php google-plus google-plus-domains

如何使用google + API发表评论或回复评论?

我试过了:

$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();
}

但它不起作用,没有发表评论或发帖。

0 个答案:

没有答案