Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid access token. When trying to post to wall #163

Open
ahab1b opened this issue Jul 22, 2018 · 0 comments
Open

Invalid access token. When trying to post to wall #163

ahab1b opened this issue Jul 22, 2018 · 0 comments

Comments

@ahab1b
Copy link

ahab1b commented Jul 22, 2018

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) }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant