使用php通过Linkedin Oauth进行身份验证后获取用户信息

使用php通过Linkedin Oauth进行身份验证后获取用户信息,php,api,oauth,linkedin,Php,Api,Oauth,Linkedin,1) 我从网上下载了这些文件 2) 创建了linkedin应用程序,我将网站URL添加为http://localhost (我在本地主机上做)并将URI重定向为http://localhost/demo/demo.php 3) 创建LinkedIn应用程序后生成的插入API密钥和密钥 在auth.php和demo.php中,如下所示: $config['base_url'] = 'http://localhost/demo/auth.php'; $config['ca

1) 我从网上下载了这些文件

2) 创建了linkedin应用程序,我将网站URL添加为
http://localhost

(我在本地主机上做)并将URI重定向为
http://localhost/demo/demo.php

3) 创建LinkedIn应用程序后生成的插入API密钥和密钥

auth.php
demo.php
中,如下所示:

$config['base_url']             =   'http://localhost/demo/auth.php';
$config['callback_url']         =   'http://localhost/demo/demo.php';
$config['linkedin_access']      =   'XXXXXXXXApi_keyXXXXXXX';
$config['linkedin_secret']      =   'XXXXXXXXsecret_keyXXXXXXX';
当我点击像
http://localhost/demo/auth.php这样的链接时,它会重定向到

https://www.linkedin.com/uas/oauth/authorize?oauth_token=
这里我收到一个错误,上面写着:

"An Error occurred during authorization, please try again later."

请让我知道我哪里做错了。

你在LinkedIn注册了你的应用程序吗?是的,我在LinkedIn注册了我的应用程序,只有这样我才能拥有API密钥和密码。是不是或者我需要做点别的事请告诉我。好吧,我也处在同样的位置。很高兴知道你是否以及如何解决了这个问题?你对你的问题有什么答案吗..我也面临同样的问题..请帮助。谢谢