Using composer: Yes
I have authenticated login with the following script
if ($linkedIn->isAuthenticated()) {
//we know that the user is authenticated now. Start query the API
$user=$linkedIn->get('v1/people/~:(firstName,lastName)');
echo "Welcome ".$user['firstName'];
exit();
} elseif ($linkedIn->hasError()) {
echo "User canceled the login.";
exit();
}
//if not authenticated
$url = $linkedIn->getLoginUrl();
echo "Login with LinkedIn";
I get the Welcome message.
Now when I run the code you specified to post to a wall. I get Invalid Access Token message. Even though it's been authenticated.
Using composer: Yes I have authenticated login with the following script
if ($linkedIn->isAuthenticated()) { //we know that the user is authenticated now. Start query the API $user=$linkedIn->get('v1/people/~:(firstName,lastName)'); echo "Welcome ".$user['firstName']; exit(); } elseif ($linkedIn->hasError()) { echo "User canceled the login."; exit(); }
//if not authenticated $url = $linkedIn->getLoginUrl(); echo "Login with LinkedIn";
I get the Welcome message. Now when I run the code you specified to post to a wall. I get Invalid Access Token message. Even though it's been authenticated.
array(5) { ["errorCode"]=> int(0) ["message"]=> string(21) "Invalid access token." ["requestId"]=> string(10) "MRJ7OAOB2U" ["status"]=> int(401) ["timestamp"]=> int(1532269505084) }