I am posting on google plus account but I can post only post text. How can I post images or videos?
This is my code so far:
$service = new Google_Service_PlusDomains($client);
$activity = new Google_Service_PlusDomains_Activity(
array(
'access' => array(
'items' => array(
'type' => 'domain'
),
'domainRestricted' => true
),
'verb' => 'post',
'object' => array(
'originalContent' => "Post using Google API PHP Client Library! 1" ,
'attachments' => ['image'=>array('url'=>$img_path)]
),
)
);
$newActivity = $service->activities->insert($user->id, $activity);
var_dump($newActivity);