LinkedIn OAuth回调网址 [英] LinkedIn OAuth callback url

查看:106
本文介绍了LinkedIn OAuth回调网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个脚本来从LinkedIn API中读取一些信息.我正在使用PECL OAuth扩展程序.

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.

我已根据文档 https://developer.linkedin设置了回调.com/documents/linkedins-oauth-details

如果定义了"OAuth回调URL",则将其用作回调 如果缺少oauth_callback参数,则用于您的请求.如果 两者均未设置,带外"(aka oob)体验将在以下情况下发生 用户,他们将获得PIN码以输入到您的应用程序中 完成授权过程.

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.

但是,这似乎没有任何区别.我已经在requestToken部分设置了回调URL,它必须可以正常工作,否则将不会重定向回我的测试页.

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.

推荐答案

我遇到了同样的问题,当我这样做时似乎可行:

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

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

其中$request_urlhttps://api.linkedin.com/uas/oauth/requestToken$callback_url是您希望LinkedIn在完成授权后将您重定向的位置.

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.

这篇关于LinkedIn OAuth回调网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆