My Programming Tutorials

My Programming Tutorials

Author Info

Paritosh Pandey

He loves Technology


36 responses to “Get User’s Profile With Linkedin API Using PHP”

  1. MAnescau says:

    Hi, i can’t manage to make it work im sorry to bother u. But i have an this error :
    “Trying to get property of non-object in C:\wamp64\www\linkedin\callback.php on line 11″

    I’m not really understanding it, again i’m sorry.
    I just have a problem with this part of the code :
    ” json_decode($server_output)->access_token ”

    Can u help me understand what’s wrong.
    Ty for your time.

  2. Manescau says:

    Thanks a lot ! It works… I’m sorry for the trouble.
    Your blog is great and your reactivy is awesome !

    I hope i’ll see more good contents like this one.
    Good look and thanks again !

  3. ajay says:

    Thank you,It Works.But Not Able To Get The All Details from linkedin,name,lastname and company name only i’m getting.

  4. Ajay says:

    No,I have all The Details In My LinkedIn,(Like Experience,Education,Languages,Certifications etc..)
    But I m Not Able To Get Those Details From My LinkedIn,Can You Please Help Me In That.
    Thanks for your Reply.

  5. Ajay says:

    Now I Got The Answer,Thank you paritosh

  6. PRASHANT says:


  7. mityung says:

    how to get email id of user

  8. Akash Shrimali says:

    Hotw to use this code in local server??

    • Paritosh Pandey says:

      Unfortunately you can’t use it on local servers. Because LinkedIn authenticates that callback url on where all the user’s data have to send.

  9. harveer singh says:

    how to post the data on the linkedin wall using
    this credential
    please help

    • Paritosh Pandey says:

      Hello @Harveer,
      unfortunately! what you’re saying cannot be done using these credentials, we need to use another LInkedIn’s API to post in linkedin’s database.
      not to worry about it we surely gonna post on “How to post on LinkedIn wall” soon.
      Thank you.

  10. Cees Rijken says:

    Awesome code snippet!

    I am trying to find a way to retrieve my OWN LinkedIn posts, so I can show them on my blog.

    So I don’t want my visitors to need to authorize themselves (just me) and only show my own posts.

    Any suggestions?

  11. sakthi says:

    Hi Paritosh Pandey ,

    Your code was working beautifully.But, i want to crawl jobs in LinkedIn profiles .Can you please help me to retrieve page content from . Any suggestion please help ??

  12. Anoop says:

    Hi Paritosh Pandey ,
    the above provided example is working fine on my end as well. please help me to retrieve the “Recommended Jobs”
    as well.

    • Paritosh Pandey says:

      Hello @Anoop,

      after getting access token instead of".json_decode($server_output)->access_token."&format=json

      please let us know whether it is working or not.

  13. Haru says:

    Hello thanks for your appreciate information my question is that api free, I can use it without be afraid to expire my access?

  14. Kalpana says:

    Hi, I am not getting any data in callback page.

  15. Linkedin says:

    Thanks a lot for writing this useful piece of information as it helps marketers utilize the platform of Linkedin to engage and communicate with more number of people on a large scale.

  16. shivam Tiwari says:

    hello sir,
    i am facing some problem by using it.
    Actually the problem is i am getting the error like given below:

    Invalid HTTP Request

    Could not process this client request HTTP method request for URL. Please double-check the URL (address) you used, or contact us if you feel you have reached this page in error.

    Can you help me out in this.

    By the way your blog is awesome…

  17. Cristóbal Olivares says:

    Hi everyone! Is there any probabilities of Linkedin ban my account after try this? I need get fullprofile fields (position and education specifally) and I think that this will a good tool to extract information. Thanks!!

  18. Suraksha says:

    Hi, is it possible to extract data from basic profiles of those who we are not connected with?

  19. ankika banerjee says:

    hi.i use this code for my laravel project.but i got error.i want to know that what is this $_GET[‘code’] contain?i mean when i try to print it,it gives error like undefind variable.please help me out with this.

  20. Muzaffar says:

    server_output2 is not getting any value on print_r($server_output2) its returning HTML with page not found

  21. […] Get User’s Profile With Linkedin API Using PHP – My … […]

  22. My Site says:

    Such great website

    Amazing blog thanks for sharing today on this blog

  23. Manoj says:

    issue in get the information – now working

    $ch1 = curl_init();
    curl_setopt($ch1, CURLOPT_URL,””.$access_token.”&format=json”);
    curl_setopt($ch1, CURLOPT_POST, 0);
    curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
    $server_output2 = curl_exec ($ch1);
    curl_close ($ch1);

Leave a Reply

Your email address will not be published. Required fields are marked *