Google 플러스에 게시하려면 PHP를 사용하고 싶습니다. 하지만 구글 플러스는 "403 금지"를 반환 나는 그것을 가능하게 코드 조각을주고 싶습니다. google plus php에서 게시
이
내 인증 기능입니다 :global $client;
$client->setAuthConfig("/home/----");
$client->setRedirectUri("----");
$client->addScope("https://www.googleapis.com/auth/plus.stream.write");
$client->addScope("https://www.googleapis.com/auth/plus.me");
$authUrl = $client->createAuthUrl();
header("Location: $authUrl");
die;
그리고 이것은 나의 새로운 포스트 기능입니다 :
$client->setAccessToken($token);
$plus = new Google_Service_Plus($client);
$plusdomains = new Google_Service_PlusDomains($client);
$postBody = new Google_Service_PlusDomains_Activity();
$postBody['object']['originalContent'] = 'Happy Monday!';
$result = $plusdomains->activities->insert('me', $postBody);
$result = $plus->people->get('me');
$response->getBody()->write(var_export($result, true));
하지만 결과는 다음과 같습니다 당신이 많은 사이트가 알다시피
{ "error": { "errors": [ { "domain": "global", "reason": "forbidden", "message": "Forbidden" } ], "code": 403, "message": "Forbidden" } }
이제 구글 플러스 계정 (뿐만 아니라 구글 애플 리케이션)의 모든 종류의 구글 oauth를 사용하여 새로운 게시물을 보낼 수 있습니다 (예 : le : buffer.com)
정확히 말해서 Google 플러스 페이지에 게시하고 싶습니다. 어떻게해야합니까? 버퍼는 어떻게합니까? – Alibehtm
Google 도메인 계정에 연결되어 있어야합니다. 너 분명히 아니야. – DaImTo
나는 너를 얻지 못했다. 연결을 위해 무엇을해야합니까?원하는 코드는 다음과 같습니다. 클라이언트가 Google 계정을 내 앱에 연결하고 Google+ 플러스 페이지에 특정 텍스트를 게시합니다. – Alibehtm