Category Archives: Facebook PHP API

PHP – Add a custom application tab to facebook fan page ?

I spend a lot of time fingering out how to add “Custom Tab” in face-book fan page.
In fact this is very easy through PhpFacebook API.

You need to have “manage_pages” permission during user authorization.

This code will allow you to get control of all fab pages. This code is good for someone who is willing to add his tab/app to fab page. This is not good for normal user.

If you logged in successfully this code will show you all fan pages with Id and names etc.

Now it is time to post you can use Ajax or any way you like to post. PAGE_ID is your fan page ID/56789349409295678.

Now you can store PAGE_ID in database and when you will run this code then one tab will be added in your fan page.

Now your user can access whatever you add in your app.

use this code in your app page to correlate custom app for different user since you already have PAGE_ID stored in db

Using this method you can create multiuser fab page tab application and make some money by adding extra features!

Share