I'm authenticating a user using the Linkedin API and everything is fine up until I make the call to get the access token. E.g:
https://www.linkedin.com/uas/oauth2/accessToken?
grant_type=authorization_code&code=12345
&redirect_uri=https://myredirect.com/callback.php&client_id=123456789
&client_secret=12345
Usually these types of calls return the access_token in the URL so I can either use $_GET or $_POST, but this returns a basic page with the JSON response:
{"access_token":"ABCDEFG","expires_in":5183078}
How can I take that access_token and put it into a $_SESSION variable? Can I split the response and then use AJAX somehow?