【发布时间】:2013-11-12 11:13:37
【问题描述】:
我有一个关于通过 Google+ API 发布消息的问题。 我尝试了以下步骤,但看不到我发布的消息。 我应该怎么做才能成功发布? 另外如果有demo或者示例代码,请告诉我。
我尝试过的步骤:
按照以下网站上的说明进行操作 http://code.google.com/p/google-api-php-client/ 执行示例/plus/simple.php 在获得个人资料之前,我可以成功。
将代码添加到示例/plus/simple.php 代码来自这个网站: https://developers.google.com/+/api/latest/moments/insert?hl=ja 没有错误或异常。来自 $plus->moments->insert 的方法返回以下代码, 但我在我的 google+ 时间线上看不到这条消息。
array(5) {
["kind"]=>
string(11) "plus#moment"
["type"]=>
string(37) "http://schemas.google.com/AddActivity"
["target"]=>
array(2) {
["kind"]=>
string(14) "plus#itemScope"
["url"]=>
string(62) "https://developers.google.com/+/plugins/snippet/examples/thing"
}
["result"]=>
array(1) {
["kind"]=>
string(14) "plus#itemScope"
}
["id"]=>
string(63) "Eg0xMzg0MjUxOTM3MTYzGJnjm7jHtPWdKykIe5CARCjQCTICEBRCBxi6gpjDhBw"
}
array(5) {
["kind"]=>
string(11) "plus#moment"
["type"]=>
string(37) "http://schemas.google.com/AddActivity"
["target"]=>
array(5) {
["kind"]=>
string(14) "plus#itemScope"
["id"]=>
string(11) "target-id-1"
["description"]=>
string(50) "A page that describes just how awesome Google+ is!"
["image"]=>
string(66) "https://developers.google.com/+/plugins/snippet/examples/thing.png"
["name"]=>
string(20) "The Google+ Platform"
}
["result"]=>
array(1) {
["kind"]=>
string(14) "plus#itemScope"
}
["id"]=>
string(75) "Eg0xMzg0MjUxOTM3NzExGJnjm7jHtPWdKzICEBRCBxi6gpjDhBxKEFuVHwoS2gtqh7B5zMyXBB0"
}
谢谢。 高桥诚
【问题讨论】:
标签: php google-plus