【发布时间】:2015-03-16 12:08:45
【问题描述】:
我想使用 PHP 在流上发布时刻。我搜索了很多,但我没有得到任何有效的例子......我使用的发布时刻:
$moment_body = new Google_Moment();
$moment_body->setType("http://schema.org/AddAction");
$item_scope = new Google_ItemScope();
$item_scope->setUrl("https://developers.google.com/+/plugins/snippet/examples/thing");
$moment_body->setObject($item_scope);
$momentResult = $plus->moments->insert('me', 'vault', $moment_body);
# This example shows how to create moment that does not have a URL.
$moment_body = new Google_Moment();
$moment_body->setType("http://schema.org/AddAction");
$item_scope = new Google_ItemScope();
$item_scope->setId("target-id-1");
$item_scope->setType("http://schema.org/AddAction");
$item_scope->setName("The Google+ Platform");
$item_scope->setDescription("A page that describes just how awesome Google+ is!");
$item_scope->setImage("https://developers.google.com/+/plugins/snippet/examples/thing.png");
$moment_body->setObject($item_scope);
$momentResult = $plus->moments->insert('me', 'vault', $moment_body);
但是它没有插入流媒体的时刻。
【问题讨论】:
-
朋友圈与在直播中发帖不同。 Google+ api 不允许您在用户信息流中发帖。
标签: php google-plus google-api-php-client