Posting in Facebook Page wall from a PHP application


In this tutorial you can learn how to post in Facebook Page wall from a PHP application.



For this tutorial i have created a sample page named ‘New Movies’. You can create a page by using ‘Create Page’ option present in your facebook dashboard.


Also i have created a Facebook App named ‘Newmoviesapp’ by which am going to connect with facebook.

To create a facebook application…

* Go to
* Login with your facebook credentials
* If you are not verified your mobile number with facebook you will be prompted to verify it.
* Click on “Create New App” and fill out the form.
* Once you created the app, under “Website with Facebook Login” add your project URL (i.e and save the changes.


Now download Facebook PHP SDK here:

Find the ‘src’ folder from the SDK download and keep it in your project folder. Create ‘postfofbpage.php’ file in the place where your ‘src‘ folder exists and place the following code.

Dont forgot to replace ‘APPID_FROM_FACEBOOK‘, ‘APPSECRET_FROM_FACEBOOK‘ and ‘YOUR_PAGE_URL‘ with your Facebook App details.

Now execute postfofbpage.php in browser and check the output. The Page will ask you to give permission for the app to post in your page wall.


Once you accept it you will be redirected to your php app where you can see a form by which you can post a status message to your facebook page wall.


Please checkout this video tutorial for line by line coding…

Share on :