Closed markopavlovic closed 9 years ago
Works for me: used the following php code: $post = array( 'comment' => 'Test social Share', 'content' => array( 'title' => 'Test Title', 'description' => 'test description', //Maxlen(255) 'submitted_url' => 'http://rankedbyreview.co.nz' ), 'visibility' => array( 'code' => 'anyone' )
);
$post = $li->post('people/~/shares', $post);
$headers[] = 'x-li-format: json';
Solution of phpsa works fine.
Perfect PHPSA !! TK
$json = array( 'comment' => 'Test social Share', 'content' => array( 'title' => 'Test Title', 'description' => 'test description', //Maxlen(255) 'submitted_url' => 'http://rankedbyreview.co.nz' ), 'visibility' => array( 'code' => 'anyone' ));
$post = $li->post('/people/~/shares', $json);
First of all great work! Somehow I can't get Share API to work with this.
I tried multiple parameter types and I always get this.
This is how I set my $payload when doing a post request with
php $this->LinkedIn->post($endpoint, $payload);
The problem is not with auth. token, since I never get an error around that and I have pre-called
php $this->LinkedIn->setAccessToken($creds['token']);
.Any guess on what it could be, is my $payload structured wrong? I gone over and over through Linkedins Share API docs, but I just don't see anything I could miss.
Thanks