If you’ve ever tried to use the native Facebook share functionality to share a specific tab on a Facebook fan page, you’ve realized that Facebook handles page tabs differently than external content, overriding the IFRAME tab’s Open Graph meta data with content from the fan page itself.
Facebook Like-Gating in IFRAME Tabs
Last year, I posted about how to show certain content to fans, and other content to non-fans using FBML. As FBML becomes deprecated, however, it’s time to show you the updated way using the Open Graph, the PHP SDK and IFRAMES.
Getting Like Count on a Facebook Fan Page Using the PHP SDK & FQL
I’m working on a project that will end up being age-gated because of graphic content. (No, not porn, unfortunately, but a blood and gore video game is almost as good.) It’s also like-gated, so we needed to fetch the number of people who liked the page, so that certain content would be unlocked when the like-count reached a certain number.