February 6, 2014 11:48 am

How to Publish Status on LinkedIn in PHP

We have received many requests from my readers to write tutorial on LinkedIn status update in PHP so this tutorial going to solve your problems and its very easy to publish status on your LinkedIn wall. No need to go to LinkedIn and update your status from your website create a file on your web site which do this all stuff without going to LinkedIn.

How to publish status on linkedin in PHP

We are not going into deep of LinkedIn API configuration you can get API integration and login details from our previous post How to Login with LinkedIn OAuth in PHP follow API instruction and configure your API.

After LinkedIn API creation you will get LinkedIn API Key and Secret Key which you need to add in config file as below.

Directory Structure:

Post to LinkedIn Directory

PHP Code
Edit config.php

In this file you have to give your API credentials.


This file can do the magic first of all show you a login with LinkedIn and once you login save all your secret keys in session and server where we need, show you a text box to update your status in that box insert your comment  and post it will go to your LinkedIn wall.

Created class object $linkedClass   =   new linkedClass(); and create LinkedIn library class object to assign keys.

Call post status method

LinkedIn allow you only 144 latter for a single post so we use this function to limit status to 144 latter substr($_POST[‘status’], 0, 144); .


Your status on LinkedIn look like this.

Post to LinkedIn Status Screen

This is the all explanation I hope you guys understand from this tutorial and it works for you. We have add this tutorial with demo and you can also download its source code

I love to answer your questions and so please feel free to comment below and do suggest us for more improvement in tutorials and demos.

Author Huzoor Bux

I am Huzoor Bux from Karachi (Pakistan). I have been working as a PHP Developer from last 5+ years, and its my passion to learn new things and implement them as a practice. Basically I am a PHP developer but now days exploring more in HTML5, CSS and jQuery libraries.

Tutorial Categories:
  • Coustar

    I have the same error. DId you found any solution ?

  • Ankit

    hey, it saves the token, i want my app to ask for allow every time it post. Can you please tell the changes i have to do?

    • Rusty

      how do you get the oath token for the application? everytime I press the connect with LinkedIn it says authorization error.

  • Mr Badass

    you have to hug your mom, then lick your dog and jump from a 10story building.

  • Aman

    We have successfully achieved oauth authentication using linkedin but after publishing the status it shows “Status Updated” and it will take effect after 1 minute but after many hours it is still not there. Where we are wrong?

  • Akhilesh

    API is not working even your demo link is not working too.

  • Vimal Raval

    can you please send me all file and code that post image on linkedin using php. It must need for me. please send me…