我目前正在尝试为我的网站安装LinkedIn的登录按钮。我试图像开发人员部分所展示的那样一步一步来。在我编写代码来获取请求令牌并使用print_r进行检查之后。LinkedIn Api - 未捕获异常'OAuthException'
define("my consumer key");
define("my consumer secret");
$oauth = new OAuth(my consumer key, my consumer secret);
//The first item of business is getting a request token
$request_token_response = $oauth->getRequestToken('https://api.linkedin.com/uas/oauth/requestToken');
if($request_token_response === FALSE) {
throw new Exception("Failed fetching request token, response was:"
. $oauth->getLastResponse());
} else {
$request_token = $request_token_response;
}
print "Request Token:\n";
printf(" - oauth_token = %s\n", $request_token['oauth_token']);
printf(" - oauth_token_secret = %s\n", $request_token['oauth_token_secret']);
print "\n";
我有“致命错误:未捕获的异常‘OAuthException’......同等证书不能与已知的CA证书进行身份验证”。被称为错误的行是低于
$request_token_response = $oauth->getRequestToken('https://api.linkedin.com/uas/oauth/requestToken');
我不明白什么是错误试图告诉我,以便我可以解决该问题。我将不胜感激,并提供或指导,以帮助我更好地了解此错误消息正试图传达以及如何解决它。
常量声明似乎是错误的,因为它没有为恒附带价值,请查看本页面developer.linkedin.com/documents声明/ getting-oauth-token-php – Ifthikhan