Closed MAXI279 closed 7 years ago
How did you solve your issue?
The problem is solved, it was related with this error "cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)"
So i add a cacert.pem downloaded from https://curl.haxx.se/ca/cacert.pem into php.ini
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
curl.cainfo = "absolute route in server"
and problem solved. thanks
Awesome. Thank you for reporting this!
Hello Nyholm I also got following error - "Could not get access token: The user may have revoked the authorization response from LinkedIn.com was empty. "
I read a lot. But not find answer. Could you give me sample code, how to get access token from 'code' (after user allow access) and so I can store in db.. For reference I have attached my code snippet here. Could you please help me in this My symfony2 application code is below-- `/**
@return array */ public function linkedinCallbackAction(Request $request) { $session = new Session(); $params = $request->query->getIterator()->getArrayCopy(); $responseData = [];
//get session state
$oauthState = $session->get('oauth_state');
//check does 'state' param is same which we set in session
if (isset($params['state']) && $oauthState == $params['state']) {
$linkedIn = new LinkedIn($this->container->getParameter('linkedin_credential')['consumer_key'],
$this->container->getParameter('linkedin_credential')['consumer_secret']);
//here error comes when calling getAccessToken method
$accessToken = $linkedIn->getAccessToken();
//access token is not get from this method
//Todo: Save access token in db
} else {
$responseData['success'] = FALSE;
$responseData['message'] = 'Invalid request, State is not matched. ';
$session->set('socialResponse', $responseData);
}
return $this->redirect($this->generateUrl('social_setting', array(), true), 301);
}`
Actual Behavior
What is the actual behavior? Im trying to login using the example code given and everything is ok but after accept app to use my linkedin information this error appears, i read a lot but i couldn´t find a solution
Expected Behavior
What is the behavior you expect? Obtain access token and successful login
Steps to Reproduce
im using laravel 5.3 and the following code in one of my routes
thanks !!