我正在编写一个使用Linked In OAuth身份验证的Web应用程序。我使用simple-linkedinphp库。它运作良好。但是有一天(不久之前)它变得破碎了。我无法使用retrieveTokenRequest()
方法获取令牌。甚至demo.php(来自simple-linkedinphp库)也无法使用我的api和密钥。
有人遇到过这样的问题吗?我对retrieveTokenRequest()
方法有以下回复:
array
'linkedin' =>
array
'oauth_problem' => string 'signature_invalid' (length=17)
'oauth_problem_advice' => string 'com.linkedin.security.auth.pub.LoginDeniedInvalidAuthTokenException while obtaining request token for :POST&https%3A%2F%2Fapi.linkedin.com%2Fuas%2Foauth%2FrequestToken&oauth_callback%3Dhttp%253A%252F%252Fapi.propertag.proj%252Fauthenticate%252Foauth%253Fprovider%253Dlinkedin%2526callback-url%253Dhttp%25253A%25252F%25252Fin.propertag.proj%25252Fopenid%25252Boauth.html%2526lType%253Dinitiate%2526lResponse%253D1%26oauth_consumer_key%3Dler1lhjlr04q%26oauth_nonce%3D37642191fbd5d7c3b69ab42cced8b9cc%26oauth_signat'... (length=656)
'info' =>
array
'url' => string 'https://api.linkedin.com/uas/oauth/requestToken' (length=47)
'content_type' => string 'application/x-www-form-urlencoded;charset=UTF-8' (length=47)
'http_code' => int 401
'header_size' => int 1090
'request_size' => int 602
'filetime' => int -1
'ssl_verify_result' => int 0
'redirect_count' => int 0
'total_time' => float 0.844714
'namelookup_time' => float 0.046769
'connect_time' => float 0.23863
'pretransfer_time' => float 0.630895
'size_upload' => float 0
'size_download' => float 819
'speed_download' => float 969
'speed_upload' => float 0
'download_content_length' => float 819
'upload_content_length' => float 0
'starttransfer_time' => float 0.844679
'redirect_time' => float 0
'certinfo' =>
array
empty
'oauth' =>
array
'header' => string 'Authorization: OAuth realm="http%3A%2F%2Fapi.linkedin.com",oauth_version="1.0",oauth_nonce="37642191fbd5d7c3b69ab42cced8b9cc",oauth_timestamp="1312808590",oauth_consumer_key="ler1lhjlr04q",oauth_callback="http%3A%2F%2Fapi.propertag.proj%2Fauthenticate%2Foauth%3Fprovider%3Dlinkedin%26callback-url%3Dhttp%253A%252F%252Fin.propertag.proj%252Fopenid%252Boauth.html%26lType%3Dinitiate%26lResponse%3D1",oauth_signature_method="HMAC-SHA1",oauth_signature="lsbQZvoII9Z5YsqM3aUPbLdiEoI%3D"' (length=481)
'string' => string 'POST&https%3A%2F%2Fapi.linkedin.com%3A80%2Fuas%2Foauth%2FrequestToken&oauth_callback%3Dhttp%253A%252F%252Fapi.propertag.proj%252Fauthenticate%252Foauth%253Fprovider%253Dlinkedin%2526callback-url%253Dhttp%25253A%25252F%25252Fin.propertag.proj%25252Fopenid%25252Boauth.html%2526lType%253Dinitiate%2526lResponse%253D1%26oauth_consumer_key%3Dler1lhjlr04q%26oauth_nonce%3D37642191fbd5d7c3b69ab42cced8b9cc%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1312808590%26oauth_version%3D1.0' (length=489)
'error' => string 'OAuth callback URL was not confirmed by the LinkedIn end-point' (length=62)
'success' => boolean false
答案 0 :(得分:2)
您是否对可能导致其中断的Simple-LinkedIn库代码进行了任何更改? 至于演示脚本,因为它被分成各种文件,你必须确保在每个文件中包含你的api密钥和秘密。