ijoiskandar / simple-linkedinphp

Automatically exported from code.google.com/p/simple-linkedinphp
0 stars 0 forks source link

401: OAuth parameters should not contain spaces #28

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I installed the library after checking the demo page you host.

The connection happens perfectly, I'm asked to authorize, but then all request 
fails because of space.

E.g. I get this for company (same for all other requests)

"
Company API:

Specific Company:

All about LinkedIn via the Company API:

Array ( [linkedin] => 401 1341934949919 6RZJY1J9N9 0 OAuth parameters should 
not contain spaces [info] => Array ( [url] => 
https://api.linkedin.com/v1/companies/1337:(id,name,ticker,description,logo-url,
locations:(address,is-headquarters)) [content_type] => text/xml;charset=UTF-8 
[http_code] => 401 [header_size] => 208 [request_size] => 539 [filetime] => -1 
[ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 0.65898 
[namelookup_time] => 0.021057 [connect_time] => 0.178369 [pretransfer_time] => 
0.499685 [size_upload] => 0 [size_download] => 266 [speed_download] => 403 
[speed_upload] => 0 [download_content_length] => 266 [upload_content_length] => 
0 [starttransfer_time] => 0.658835 [redirect_time] => 0 ) [oauth] => Array ( 
[header] => Authorization: OAuth 
realm="http%3A%2F%2Fapi.linkedin.com",oauth_version="1.0",oauth_nonce="9f7f1003d
de7bac15b5fb8c46cc21252",oauth_timestamp="1341934949",oauth_consumer_key="%3Cyou
r%20application%20key%20here%3E",oauth_token="192dc8bd-4b67-4596-9a66-bb3f4803ab
fe",oauth_signature_method="HMAC-SHA1",oauth_signature="8FTSEPCRiw3dV2EwzvOD%2Fy
CHQcc%3D" [string] => 
GET&https%3A%2F%2Fapi.linkedin.com%2Fv1%2Fcompanies%2F1337%3A%28id%2Cname%2Ctick
er%2Cdescription%2Clogo-url%2Clocations%3A%28address%2Cis-headquarters%29%29&oau
th_consumer_key%3D%253Cyour%2520application%2520key%2520here%253E%26oauth_nonce%
3D9f7f1003dde7bac15b5fb8c46cc21252%26oauth_signature_method%3DHMAC-SHA1%26oauth_
timestamp%3D1341934949%26oauth_token%3D192dc8bd-4b67-4596-9a66-bb3f4803abfe%26oa
uth_version%3D1.0 ) [success] => [error] => HTTP response from LinkedIn 
end-point was not code 200 ) Error retrieving company information:

RESPONSE:

1
"

Any idea?

Original issue reported on code.google.com by jcha...@gmail.com on 10 Jul 2012 at 3:47

GoogleCodeExporter commented 8 years ago
Same problem with 3.2.0 and 3.3.0 (I checked out the source code)

My host info:

Demo using: Simple-LinkedIn v3.3.0, cURL v7.21.0, PHP v5.2.17

Original comment by jcha...@gmail.com on 10 Jul 2012 at 4:07

GoogleCodeExporter commented 8 years ago
Ho well, my bad. I assumed, the key/secret only needed to be specified in the 
main file (I was checking what could be wrong in the lib file).

Thanks for making this library and I'm happy to have this defect closed

Original comment by jcha...@gmail.com on 10 Jul 2012 at 4:10

GoogleCodeExporter commented 8 years ago
I am having this same issue. How did you solve this problem? 

Original comment by nick.ty...@aquasana.com on 12 Oct 2013 at 9:58

GoogleCodeExporter commented 8 years ago
The issue was the fact that the appKey and secretKey needed to be set in each 
of the files in the demo folder. 

Original comment by BGuthri...@gmail.com on 12 Dec 2013 at 8:10

GoogleCodeExporter commented 8 years ago
Thank you...I was searching this error for hours...Your solution helped me to 
solve mine error

Original comment by swayam.t...@gmail.com on 3 Jul 2014 at 1:51