Search code examples
facebookfacebook-pagefacebook-comments

How to make Facebook comment moderation work for iframe app installed as page tab


I have a Facebook App that is setup as an "App on Facebook" and a "Page Tab." I have this app installed as a tab on a Facebook business profile page.

The app is loaded as an iframe and I use the Facebook JavaScript SDK withing the iframed page to setup social widgets including comments.

My problems:

  • I can't access the comment moderation tools on the page -- they don't show up at the top of the comment widget.
  • When accessing the comment moderation tool at http://developers.facebook.com/tools/comments, I don't see any comments associated with the app.

I am an Admin of both the page and the app.

I am declaring an App ID in the <head> of the page:

<meta property="fb:app_id" content="{MY_APP_ID}">

Is there any special configuration that is needed to make this work? I have successfully setup comments with moderation before on regular web sites, so I think there must be something special about the application tab case. Should my fb:app_id reference the page's ID or the app ID of the tab?


Solution

  • Reason you can't moderate comments is the fact you linked Comments Social Plugin to Facebook Page URL.

    Facebook linter doesn't even get to the Page Tab Canvas URL of your Application to get the values of fb:app_id and any other OG tags too.

    Simply link Comments Plugin to URL accessible by linter (like your page canvas URL) pass it to linter to ensure all required tags is here, post comment and see it in moderation tool.

    BTW, You will loose all existing comment due to URL change...

    Update:
    As you noted users may click on link comment link posted in feed they will see your app "naked", while this is true if you'll use Page Tab Canvas URL for linking Comments Social Plugin you may overcome it with next scenario:
    You may link it to some special page which will only include OpenGraph tags and single javascript line redirecting to your Application tab on Facebook Page (according to URL arguments to that page for example).

    <!-- OG tags should be placed here -->
    <script type="text/javascript">
      window.top.location = 'http://facebook.com/pages/PAGENAME/PAGEID?sk=?sk=v_APPID'
    </script>
    

    If that special page will be part of your "regular" Application (I mean within the scope of your Application Canvas URL) you may link to it's URL within Application on Facebook to avoid driving users outside of Facebook itself. Once user landed to that special page he will be redirected there real comments are displayed...

    If you'll use page outside of Application Canvas URL users will get out of Facebook and only then landed to Tab.