【问题标题】:post moment on google plus page's stream using PHP使用 PHP 在 google plus 页面的流上发布时刻
【发布时间】: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


【解决方案1】:

DalmTo 是正确的,您不能在 Google+ 信息流中发布信息页。 Moments 用于一个名为 App Activity 的功能:https://developers.google.com/+/features/app-activities,它的使用不是很广泛(在 UI 中很难找到)。

有一个用于发布到页面的 API,但仅限于少数合作伙伴,例如 Hootsuite - 您可以使用其中一个作为中介:https://www.google.com/+/brands/3rdpartytools.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-04-07
    • 1970-01-01
    相关资源
    最近更新 更多