dnzengou / simple-linkedinphp

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

401 unauthorzed #20

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

i have did all the integration for messaging but while try to sent message It 
is showing 401 unauthorized error.please help me...thanks in advance

Original issue reported on code.google.com by ashie...@gmail.com on 16 Jan 2012 at 11:03

GoogleCodeExporter commented 8 years ago
I'm getting the same error as well.  All other functions are working fine.  
When I put my keys in for the content.php file though, I keep getting the 401 
issue...  below is what i get...

Error posting network update:

RESPONSE:

Array
(
    [linkedin] => 

  401
  1326849155500
  FD1Y4FHO1S
  0
  [unauthorized]. OAU:YmTvO0Fu86ZGSfv7YOnm_cdPPDByXCZ0yEKfpvRuDOjOXB0SjrUK2KH-2YLb47pl|92f4e15f-3886-4eeb-bd32-5d8f4a4de7cb|*01|*01:1326849155:36251GNjbpy4UWTbj9bUeotfM8E=

    [info] => Array
        (
            [url] => https://api.linkedin.com/v1/people/~/person-activities
            [content_type] => text/xml;charset=UTF-8
            [http_code] => 401
            [header_size] => 179
            [request_size] => 852
            [filetime] => -1
            [ssl_verify_result] => 0
            [redirect_count] => 0
            [total_time] => 0.105439
            [namelookup_time] => 2.3E-5
            [connect_time] => 0.016265
            [pretransfer_time] => 0.071455
            [size_upload] => 0
            [size_download] => 393
            [speed_download] => 3727
            [speed_upload] => 0
            [download_content_length] => 393
            [upload_content_length] => 0
            [starttransfer_time] => 0.105403
            [redirect_time] => 0
        )

    [oauth] => Array
        (
            [header] => Authorization: OAuth realm="http%3A%2F%2Fapi.linkedin.com",oauth_version="1.0",oauth_nonce="26b509689d625ddfffa694de02cbc164",oauth_timestamp="1326849155",oauth_consumer_key="YmTvO0Fu86ZGSfv7YOnm_cdPPDByXCZ0yEKfpvRuDOjOXB0SjrUK2KH-2YLb47pl",oauth_token="92f4e15f-3886-4eeb-bd32-5d8f4a4de7cb",oauth_signature_method="HMAC-SHA1",oauth_signature="36251GNjbpy4UWTbj9bUeotfM8E%3D"
            [body] => 
                           linkedin-html
                           <a href="http://www.linkedin.com/profile?viewProfile=&key=45328673&authToken=IZel&authType=name&trk=api*a130487*s138885*">Gregory Benz</a> update

            [string] => POST&https%3A%2F%2Fapi.linkedin.com%2Fv1%2Fpeople%2F~%2Fperson-activities&oauth_consumer_key%3DYmTvO0Fu86ZGSfv7YOnm_cdPPDByXCZ0yEKfpvRuDOjOXB0SjrUK2KH-2YLb47pl%26oauth_nonce%3D26b509689d625ddfffa694de02cbc164%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1326849155%26oauth_token%3D92f4e15f-3886-4eeb-bd32-5d8f4a4de7cb%26oauth_version%3D1.0
        )

    [success] => 
    [error] => HTTP response from LinkedIn end-point was not code 201
)

LINKEDIN OBJ:

LinkedIn Object
(
    [callback:protected] => 
    [token:protected] => Array
        (
            [oauth_token] => 92f4e15f-3886-4eeb-bd32-5d8f4a4de7cb
            [oauth_token_secret] => c0587996-6fa9-4217-aee1-8e1a444183ad
            [oauth_expires_in] => 0
            [oauth_authorization_expires_in] => 0
        )

    [application_key:protected] => YmTvO0Fu86ZGSfv7YOnm_cdPPDByXCZ0yEKfpvRuDOjOXB0SjrUK2KH-2YLb47pl
    [application_secret:protected] => XZbZLjYuwhWKAlgpSI0AWXUiv8Z05yuBhBaX8ftcTrKm6hzJ02G3eva4UxXL_jyY
    [response_format:protected] => xml
    [last_request_headers] => Array
        (
            [0] => Authorization: OAuth realm="http%3A%2F%2Fapi.linkedin.com",oauth_version="1.0",oauth_nonce="26b509689d625ddfffa694de02cbc164",oauth_timestamp="1326849155",oauth_consumer_key="YmTvO0Fu86ZGSfv7YOnm_cdPPDByXCZ0yEKfpvRuDOjOXB0SjrUK2KH-2YLb47pl",oauth_token="92f4e15f-3886-4eeb-bd32-5d8f4a4de7cb",oauth_signature_method="HMAC-SHA1",oauth_signature="36251GNjbpy4UWTbj9bUeotfM8E%3D"
        )

    [last_request_url] => https://api.linkedin.com/v1/people/~/person-activities
)

Original comment by gregory....@gmail.com on 18 Jan 2012 at 1:17

GoogleCodeExporter commented 8 years ago
It looks like it stopped working at the demo link as well... 
http://simplelinkedin.fiftymission.net/demo/content.php

when I type something like "new update" into the post network update button, I 
get the following error:

Error posting network update:

RESPONSE:

Array
(
    [linkedin] => 

  401
  1326849853526
  0ARZHBAAAR
  0
  [unauthorized]. OAU:YmTvO0Fu86ZGSfv7YOnm_cdPPDByXCZ0yEKfpvRuDOjOXB0SjrUK2KH-2YLb47pl|92f4e15f-3886-4eeb-bd32-5d8f4a4de7cb|*01|*01:1326849853:JX2EPzUcAMaPJ5LUe1SeJbSCXdU=

    [info] => Array
        (
            [url] => https://api.linkedin.com/v1/people/~/person-activities
            [content_type] => text/xml;charset=UTF-8
            [http_code] => 401
            [header_size] => 179
            [request_size] => 856
            [filetime] => -1
            [ssl_verify_result] => 0
            [redirect_count] => 0
            [total_time] => 0.100674
            [namelookup_time] => 2.7E-5
            [connect_time] => 0.016236
            [pretransfer_time] => 0.065891
            [size_upload] => 0
            [size_download] => 393
            [speed_download] => 3903
            [speed_upload] => 0
            [download_content_length] => 393
            [upload_content_length] => 0
            [starttransfer_time] => 0.100614
            [redirect_time] => 0
        )

    [oauth] => Array
        (
            [header] => Authorization: OAuth realm="http%3A%2F%2Fapi.linkedin.com",oauth_version="1.0",oauth_nonce="c14f6a33659d2309d7baabf0b194478b",oauth_timestamp="1326849853",oauth_consumer_key="YmTvO0Fu86ZGSfv7YOnm_cdPPDByXCZ0yEKfpvRuDOjOXB0SjrUK2KH-2YLb47pl",oauth_token="92f4e15f-3886-4eeb-bd32-5d8f4a4de7cb",oauth_signature_method="HMAC-SHA1",oauth_signature="JX2EPzUcAMaPJ5LUe1SeJbSCXdU%3D"
            [body] => 
                           linkedin-html
                           <a href="http://www.linkedin.com/profile?viewProfile=&key=45328673&authToken=IZel&authType=name&trk=api*a130487*s138885*">Gregory Benz</a> new update

            [string] => POST&https%3A%2F%2Fapi.linkedin.com%2Fv1%2Fpeople%2F~%2Fperson-activities&oauth_consumer_key%3DYmTvO0Fu86ZGSfv7YOnm_cdPPDByXCZ0yEKfpvRuDOjOXB0SjrUK2KH-2YLb47pl%26oauth_nonce%3Dc14f6a33659d2309d7baabf0b194478b%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1326849853%26oauth_token%3D92f4e15f-3886-4eeb-bd32-5d8f4a4de7cb%26oauth_version%3D1.0
        )

    [success] => 
    [error] => HTTP response from LinkedIn end-point was not code 201
)

LINKEDIN OBJ:

LinkedIn Object
(
    [callback:protected] => 
    [token:protected] => Array
        (
            [oauth_token] => 92f4e15f-3886-4eeb-bd32-5d8f4a4de7cb
            [oauth_token_secret] => c0587996-6fa9-4217-aee1-8e1a444183ad
            [oauth_expires_in] => 0
            [oauth_authorization_expires_in] => 0
        )

    [application_key:protected] => YmTvO0Fu86ZGSfv7YOnm_cdPPDByXCZ0yEKfpvRuDOjOXB0SjrUK2KH-2YLb47pl
    [application_secret:protected] => XZbZLjYuwhWKAlgpSI0AWXUiv8Z05yuBhBaX8ftcTrKm6hzJ02G3eva4UxXL_jyY
    [response_format:protected] => xml
    [last_request_headers] => Array
        (
            [0] => Authorization: OAuth realm="http%3A%2F%2Fapi.linkedin.com",oauth_version="1.0",oauth_nonce="c14f6a33659d2309d7baabf0b194478b",oauth_timestamp="1326849853",oauth_consumer_key="YmTvO0Fu86ZGSfv7YOnm_cdPPDByXCZ0yEKfpvRuDOjOXB0SjrUK2KH-2YLb47pl",oauth_token="92f4e15f-3886-4eeb-bd32-5d8f4a4de7cb",oauth_signature_method="HMAC-SHA1",oauth_signature="JX2EPzUcAMaPJ5LUe1SeJbSCXdU%3D"
        )

    [last_request_url] => https://api.linkedin.com/v1/people/~/person-activities
)

Original comment by gregory....@gmail.com on 18 Jan 2012 at 1:24

GoogleCodeExporter commented 8 years ago
p.s. greatly appreciate any help!

Original comment by gregory....@gmail.com on 18 Jan 2012 at 1:25

GoogleCodeExporter commented 8 years ago
Update your OAuth library, it appears the signature method has changed

Original comment by davidcroda on 5 Mar 2012 at 5:52

GoogleCodeExporter commented 8 years ago
I am getting 401 error 

Error sharing content:

RESPONSE:

Array
(
    [linkedin] => 

  401
  1359100206075
  WE4IJWAJHX
  0
  [unauthorized]. OAU:va4rby64tu75|2f50622f-6943-4583-8318-45b676945e9b|*01|*01:1359100211:w2DRviAQdHCzbn1c+McA0qOfTvU=

    [info] => Array
        (
            [url] => https://api.linkedin.com/v1/people/~/shares
            [content_type] => text/xml;charset=UTF-8
            [http_code] => 401
            [header_size] => 208
            [request_size] => 973
            [filetime] => -1
            [ssl_verify_result] => 20
            [redirect_count] => 0
            [total_time] => 1.232
            [namelookup_time] => 0
            [connect_time] => 0.312
            [pretransfer_time] => 0.92
            [size_upload] => 531
            [size_download] => 341
            [speed_download] => 276
            [speed_upload] => 431
            [download_content_length] => 341
            [upload_content_length] => 531
            [starttransfer_time] => 1.232
            [redirect_time] => 0
            [certinfo] => Array
                (
                )

            [redirect_url] => 
        )

    [oauth] => Array
        (
            [header] => Authorization: OAuth realm="",oauth_version="1.0",oauth_nonce="58685cbce5eccd8bfd96011ad8ecabf4",oauth_timestamp="1359100211",oauth_consumer_key="va4rby64tu75",oauth_token="2f50622f-6943-4583-8318-45b676945e9b",oauth_signature_method="HMAC-SHA1",oauth_signature="w2DRviAQdHCzbn1c%2BMcA0qOfTvU%3D"
            [body] => 

                               http://google.comhttp://google.commaheshmahesh

                           connections-only

            [string] => POST&https%3A%2F%2Fapi.linkedin.com%2Fv1%2Fpeople%2F~%2Fshares&oauth_consumer_key%3Dva4rby64tu75%26oauth_nonce%3D58685cbce5eccd8bfd96011ad8ecabf4%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1359100211%26oauth_token%3D2f50622f-6943-4583-8318-45b676945e9b%26oauth_version%3D1.0
        )

    [success] => 
    [error] => HTTP response from LinkedIn end-point was not code 201
)

LINKEDIN OBJ:

LinkedIn Object
(
    [callback:protected] => 
    [token:protected] => Array
        (
            [oauth_token] => 2f50622f-6943-4583-8318-45b676945e9b
            [oauth_token_secret] => 7b5f0757-92eb-4a36-8011-84e72ff8e773
            [oauth_expires_in] => 5183997
            [oauth_authorization_expires_in] => 5183997
        )

    [application_key:protected] => va4rby64tu75
    [application_secret:protected] => 1ARBppKh1OxSWWav
    [response_format:protected] => xml
    [last_request_headers] => Array
        (
            [0] => Authorization: OAuth realm="",oauth_version="1.0",oauth_nonce="58685cbce5eccd8bfd96011ad8ecabf4",oauth_timestamp="1359100211",oauth_consumer_key="va4rby64tu75",oauth_token="2f50622f-6943-4583-8318-45b676945e9b",oauth_signature_method="HMAC-SHA1",oauth_signature="w2DRviAQdHCzbn1c%2BMcA0qOfTvU%3D"
        )

    [last_request_url] => https://api.linkedin.com/v1/people/~/shares
)

Original comment by maheshch...@gmail.com on 25 Jan 2013 at 7:51

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
did u get the answer pleas let me know I am also getting error I guess this is 
because of  oauth_expires_in time in my case it show "[oauth_expires_in] => 
5183998
                            [oauth_authorization_expires_in] => 5183998" 

I don't know how to change it so that it can show oauth_expires_in=>0

Original comment by fischer....@gmail.com on 18 Mar 2013 at 3:12

GoogleCodeExporter commented 8 years ago
if you set it to oauth_expires_in=>0 the authorization expires immediately. 
That's certainly not the problem. Nobody seems to have found out how to make 
this code work though sorry. Updating the OAuth library doesn't help either.

Original comment by minagrey...@gmail.com on 18 Mar 2013 at 6:05