2
私はこのエラーが何か分かりません。私は同様にGoogleのPHPクライアントのライブラリに誰かがこれを助けることができると思うかもしれません。Google_ActivityはGoogle_ActivityObjectのインスタンスである必要があります
これは私のコードです:
$this->client->refreshToken($con[0]->secret);
$newtoken = $this->client->getAccessToken();
$this->client->setAccessToken($newtoken);
$activityAccess = new Google_Acl();
$activityAccess->setDomainRestricted(true);
$object = new Google_ActivityObject();
$originalContent = $object->setOriginalContent('Happy me');
$originalContent = $object->setContent('Happy me');
$originalContent = $object->setObjectType('domain');
$body = explode(".", $args["post"]);
$activity = new Google_Activity();
$postBody = $activity->setTitle($body[0]);
$postBody = $activity->setVerb('post');
$postBody = $activity->setKind('plus#activity');
$postBody = $activity->setObject($originalContent);
$postBody = $activity->setAccess($activityAccess);
$data = $this->connect->activities->insert('me', $postBody);
これは、以下のエラーを生成します。私は正確にエラーが何を意味するのか分からない。
A PHP Error was encountered
Severity: 4096
Message: Argument 1 passed to Google_Activity::setObject() must be an instance of Google_ActivityObject , null given, called in
/home/socialsu/public_html/application/autopost/Google_plus.php on
line 179 and defined
Filename: contrib/Google_PlusDomainsServices.php
Line Number: 635
A PHP Error was encountered
Severity: 4096
Message: Argument 2 passed to Google_ActivitiesServiceResource::insert() must be an instance of Google_Activity, null given, called in /home/socialsu/public_html/application/autopost/Google_plus.php on line 182 and defined
Filename: contrib/Google_PlusDomainsServices.php
Line Number: 54
A PHP Error was encountered
Severity: Notice
Message: Undefined index: type
Filename: io/Google_REST.php
Line Number: 98
A PHP Error was encountered
Severity: Notice
Message: Undefined index: value
Filename: io/Google_REST.php
Line Number: 109