문제

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?

도움이 되었습니까?

해결책

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.)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top