0
我想要一个PHP函数来识别Google+ API是否是个人资料,网页或社区的ID。Google+ API键识别个人资料,网页或社区的ID?
我想要一个PHP函数来识别Google+ API是否是个人资料,网页或社区的ID。Google+ API键识别个人资料,网页或社区的ID?
people.get返回的Person资源包括一个“kind”字段,用于指定“plus#person”或“plus#page”。但是,目前社区没有官方的API支持。你可以看到完整的API规范:https://developers.google.com/+/api/latest/people
对于PHP,在people.get调用如下:
$me = $plus->people->get('me');
print "Kind: {$me['kind']}\n";
此示例假设一个客户对象被创建。要了解有关创建客户端的更多信息,请查看启动器:https://github.com/googleplus/gplus-quickstart-php