LinkedIn OAuth callback url [closed]

*爱你&永不变心* 提交于 2019-12-13 07:51:54

问题


I'm trying to create a script to read some information from the LinkedIn API. I'm using the PECL OAuth extension.

I've managed to get my request token, and auth, then it returns me to my script. However I cannot seem to get it to not be the "out-of-band" authentication with the pin number.

I've set the callback as per the docs, https://developer.linkedin.com/documents/linkedins-oauth-details

If the "OAuth Callback URL" is defined, this is used as the callback for your request if the oauth_callback parameter is missing. If neither is set, the "out-of-band" (aka oob) experience will happen for the user, and they will be given a PIN to input into your application to complete the authorization process.

However this doesn't seem to make any difference. I've set my call back url on the requestToken part, and it must be working or it wouldn't redirect back to my test page.


回答1:


I had the same issue, seems to work when I do this:

$token = $oauth->getRequestToken($request_url, $callback_url);

where $request_url is https://api.linkedin.com/uas/oauth/requestToken, and $callback_url is where you want LinkedIn to redirect you when it is done authorizing.



来源:https://stackoverflow.com/questions/8560945/linkedin-oauth-callback-url

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!