-1

I have created a facebook application and a facebook page. Using js sdk i have collected the access token for the page Now I want to add a page tab using php code in the page.

Not getting any idea how to do this

Does any one have an idea about this

Lix
  • 47,311
  • 12
  • 103
  • 131
rohitpurohit
  • 81
  • 1
  • 3
  • 10
  • 2
    Maybe this answer that I have a couple of hours ago will help you out... http://facebook.stackoverflow.com/a/9062105/558021. You should search first before asking a new question - perhaps someone else has been having the same problem as you... – Lix Jan 30 '12 at 12:38

3 Answers3

4

You can do this with PHP-SDK like this (see details in documentation for tabs connection page object):

$facebook->api('/PAGE_ID/tabs', 'POST', array(
  'app_id'=>'APP_ID',
  'access_token'=>'PAGE_ACCESS_TOKEN'
));
Juicy Scripter
  • 25,778
  • 6
  • 72
  • 93
  • To see more ways to do this you can also read my answer for [How to add tab application to a page with the “new auth dialog”](http://facebook.stackoverflow.com/a/8596312/155033) – Juicy Scripter Jan 30 '12 at 12:55
  • hi.. why it does not work for me? it gives the error (#210) Subject must be a page. – Mohd Shahid Aug 22 '12 at 11:52
2

simple steps :)

1.verify that you complete page tab settings in your app settings link

2.make sure your page tab app should be 520px

3.now you just need to forward browser to this below address so user can select with page he/she want to add tab https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&next=YOUR_URL

you can also read the above points in detail here is link of fb doc

Danish Iqbal
  • 1,464
  • 1
  • 13
  • 24
  • hi if you need any more help from me please contact me now because i will be offline for few hours after almost 10 minutes :) and yes when you done let me known your fb app url so i will also use this :) – Danish Iqbal Jan 30 '12 at 12:53
  • Hi danish i am not so clear on this how to do this , i just want to add a facebook tab in my page , so can you give me ur contact info , to discuss on this clearly – rohitpurohit Jan 30 '12 at 12:59
  • @RohitPuroHit 1. [go to this link](https://developers.facebook.com/apps) and give me your app id and your app url and i dont known giving contacts details is allow or not – Danish Iqbal Jan 30 '12 at 13:05
  • Hi danish , i tried it using 3 step , but it is saying that "This application does not support integration with your profile." Can you suggest how to do this – rohitpurohit Jan 30 '12 at 13:15
  • @RohitPuroHit try using this url http://facebook.com/add.php?api_key=YOUR_APP_KEY&pages=1&page=YOUR_PAGE_ID and if this yet not solved your problem give me your app id so that i check this personally :) – Danish Iqbal Jan 30 '12 at 17:29
  • this one is opening a page which asks for adding the page to application but i want to add tabs in multiple pages from one application , please give me ur contact info so i can contact you and explain clearly – rohitpurohit Jan 31 '12 at 07:21
1

You can add an app to a page by redirecting user to:

http://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&next=YOUR_URL

Reference: http://developers.facebook.com/docs/appsonfacebook/pagetabs/

Jashwant
  • 28,410
  • 16
  • 70
  • 105