I’m building an iframe Facebook application and I want to set up a ‘like gate’ where a user has to like my page to continue past the opening of the application. (After they click like I allow them to click a ‘continue’ button using JavaScript).
Is there any way to detect if a visiting Facebook user has liked a page without first forcing them to authorize my application? I know I can query their likes using the graph api or fql but I’d like to avoid forcing them through the auth dialog for this one part of the app. The reason I ask is that I’ve seen some applications on Facebook that appear to allow this functionality.
For example, this page:
http://www.facebook.com/velcrobrand?sk=app_156218351098324
I don’t have to authorize the facebook application but the page knows if I have liked it or not.
I’ve made some progress figuring this out.
http://www.chilipepperdesign.com/2011/02/15/reveal-fan-gate-like-gate-facebook-iframe-tab-tutorial-with-php
The method described in the above link only works if the page is loaded inside a tab of an application fan page and NOT the applications primary iframe page.
Here: ‘pages’ object is present
http://www.facebook.com/apps/application.php?id=249709505050393&sk=app_249709505050393
Here: ‘pages’ object is not present
http://apps.facebook.com/flipkey/
Not sure why this is but I think I have enough to move forwards and create my fan/like-gate.