Question

I have a client who wants to have the user liked his app before asking for permissions. For users not having defined advanced security settings in their profiles this is possible, but I have occasions that I must ask for user_likes permissions to get that info so this is a dead end. One solution could be to have my own like button in the page and register FB.event.subsribe to collect the info, but because the app will be used in a page tab (where a like button is already displayed by FB on top) this would be ugly and confusing.

Any ideas?

Was it helpful?

Solution

Within a page tab app, you get the info whether the viewing user liked the page already or not in the signed_request. (Since it is POSTed to your app on initial load into the iframe, you can only access it server-side.)

For how to parse it, see here: https://developers.facebook.com/docs/facebook-login/using-login-with-games#parsingsr (If you are using the PHP SDK, that has a method to get it parsed implemented already.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top