REST/LinkedInClientService.php
public function shareOnCompanyPage(Activity $activity, array $content)
    {
        $id = $activity->getLocation()->getIdentifier();

        return $this->connect->request(
            'POST',
            'companies/'.$id.'/shares',
            [
                'headers' => [
                    'x-li-format' => 'json',
                    ],
                'body' => json_encode($content),
                'query' => [
                    'format' => 'json',
                ]
            ]
        );
    }
public function shareOnCompanyPage(Activity $activity, array $content)
    {
        $id = $activity->getLocation()->getIdentifier();

        return $this->connect->request(
            'POST',
            'companies/'.$id.'/shares',
            [
                'headers' => [
                    'x-li-format' => 'json',
                    ],
                'body' => json_encode($content),
                'query' => [
                    'format' => 'json',
                ]
            ]
        );
    }
public function shareOnCompanyPage ( Activity $ activity , array $ content ) { $ id = $ activity -> getLocation ( ) -> getIdentifier ( ) ; return $ this -> connect -> request ( 'POST' , 'companies/' . $ id . '/shares' , [ 'headers' => [ 'x-li-format' => 'json' , ] , 'body' => json_encode ( $ content ) , 'query' => [ 'format' => 'json' , ] ] ) ; }
Share a news on a company page

@param Activity $activity
@param string   $content

@return array
Share a news on a company page