0

Google+ API を介したメッセージ投稿について質問があります。以下の手順を試しましたが、投稿したメッセージが表示されませんでした。投稿を成功させるにはどうすればよいですか?また、デモやサンプルコードがあれば教えてください。

私が試した手順:

  1. 以下のサイトの指示に 従いましたhttp://code.google.com/p/google-api-php-client/ execute examples/plus/simple.php プロファイルを取得するまで成功できます。

  2. examples/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" 
}

ありがとうございました。高橋誠

4

1 に答える 1