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

getAccessToken gives 500 error #37

Open
ghost opened this issue Oct 7, 2017 · 1 comment
Open

getAccessToken gives 500 error #37

ghost opened this issue Oct 7, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Oct 7, 2017

I initiate the class as stated in the readme file like

$li = new LinkedIn(
  array(
    'api_key' => 'yourapikey', 
    'api_secret' => 'yourapisecret', 
    'callback_url' => 'https://yourdomain.com/redirecthere'
  )
);
$url = $li->getLoginUrl
(
  array(
    LinkedIn::SCOPE_BASIC_PROFILE, 
    LinkedIn::SCOPE_EMAIL_ADDRESS, 
    LinkedIn::SCOPE_NETWORK
  )
);
$token = $li->getAccessToken($_REQUEST['code']);

the getAccessToken function gives a 500 error.

When I print out the contents of $li, it says "_access_token:LinkedIn\LinkedIn:private".
Am I missing something?

@WebAndCow
Copy link

HI, try to add this in the $options of _makeRequest :
CURLOPT_TIMEOUT => 5

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