我想从 google+ 页面获取内容(帖子)并将其作为提要发布到我的网站。有资料吗?
我读到当前的 API 不允许这样做,但这些主题来自去年。
谢谢。
最佳答案
您可以执行 activities.list ,无需验证,通过从 API console 传递您的“简单” key 对于创建的已启用 Google+ 服务的项目。对 API 调用的访问仅限于您在项目中设置的授权来源。
创建项目后,在“简单 API 访问”部分中有一个 API key 。使用此 key 、您的客户端 ID 和客户端 key 构建您的客户端:
<?
$client = new Google_Client();
$client->setDeveloperKey("YOUR_API_KEY");
$plus = new Google_PlusService($client);
$activities = $plus->activities->listActivities("+GooglePlusDevelopers", "public");
?>
<html><body><pre><? echo print_r($activities);?></pre></body></html>
最后一点,请确保您使用 latest Google+ PHP client .
关于api - 从 google plus 页面获取帖子,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14623452/