2011-08-08 24 views
2

我正在使用Linked In OAuth身份驗證編寫Web應用程序。我使用simple-linkedinphp庫。它運作良好。但是有一天(不遠處)它被打破了。我無法使用retrieveTokenRequest()方法獲得令牌。即使demo.php(來自simple-linkedinphp庫)也不適用於我的api和密鑰。LinkedTreateTokenRequest返回「signature_invalid」問題

有沒有人遇到過這樣的問題?我有以下爲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 

回答

2

您是否對可能造成它打破了簡單LinkedIn庫代碼進行更改? 至於演示腳本,因爲它被分成各種文件,所以你必須確保你在每個文件中包含你的api密鑰和祕密。

+0

大聲笑,這是它:) 但我不記得當我做到了......奇怪! –

+0

非常感謝! –