I’m in the process of building a fan gate using facebook’s javascript sdk. I’d like to determine if the user has “liked” my page so I can display / hide content. Currently, if I use the javascript sdk, the user is prompted with permissions which is what I’d like to avoid.
Has anyone successfully achieved this in javascript? I’m able to do this without issue in PHP but unfortunately, we are not able to use php in our current project.
This is not possible on the client side. Facebook sends an HTTP POST request and you need to process the signed_request post variable which requires server code to access.