Search code examples
facebookxfbml

Facebook "Add to my page" button


I have looked all over the internet. Can anyone point me to some resources for adding the "Add to my page" button on my facebook pages tab app. I have seen other pages do it, so i know its possible.


Solution

  • You can add an app to a page via:

    1. The API: https://developers.facebook.com/docs/reference/api/page/#tabs
    2. The 'Add to my page' link on the app's profile page (deprecated, see https://developers.facebook.com/blog/post/611/ for details)
    3. The new 'Add Page Tab' dialog you can use in your app (see the above blog post again for more details, there's full docs here: https://developers.facebook.com/docs/reference/dialogs/add_to_page/ , and a short example below):

    Create a link on your site to:

     https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&display=popup&next=URL_TO_REDIRECT_USER_TO_AFTER_ADDING
    

    You can also trigger this using the Facebook Javascript SDK (details on the doc above)