Skip to content

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

Description

@ahab1b

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions