php - Google Plus Client API Share Post Result Forbidden -


i use google api post on google plus profile (me).

i have code on laravel 5.3 :

$client = new google_client();  $client->setaccesstoken([     'access_token' => 'token...',     'expires_in' => 3600, ]);  $plusdomains = new google_service_plusdomains($client);  $activityobject = new google_service_plusdomains_activityobject(); $activityobject->setcontent("somethings's not importance"); $activityaccess = new google_service_plusdomains_acl(); $activityaccess->setdomainrestricted(true);  $resource = new google_service_plusdomains_plusdomainsaclentryresource();  $resource->settype("public");  $resources = array(); $resources[] = $resource;  $activityaccess->setitems($resources);  $activity = new google_service_plusdomains_activity(); $activity->setobject($activityobject); $activity->setaccess($activityaccess);  $result = $plusdomains->activities->insert("me", $activity);  dd($result); 

but have error when want post on profile.

{     "error": {     "errors": [     {         "domain": "global",         "reason": "forbidden",         "message": "forbidden"     }     ],         "code": 403,         "message": "forbidden"     } } 

package use : https://github.com/google/google-api-dotnet-client

could me please?


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -