I am working on an iFrame application on Facebook canvas and I will lose my mind. I am trying to check if the user is a fan of the page on which the application is located so that I can enable or disable the vote.
I am using the following code:
function CheckFan() {
FB.init({
appId: 'xxxxxxxxxxxxxxxxxxxxxxxxxx',
status: true,
cookie: true,
xfbml: true
});
FB.api({ method: 'pages.isFan', page_id: '145116742177104' }
, function(resp) {
if (resp) { $('#main_frame').show(); $('#non_fan').hide(); }
else { $('#main_frame').hide(); $('#non_fan').show(); }
});
}
This JS SDK pushes me against the wall, and calling the documentation "incomplete" is an insult to incompleteness.
Any input will be entered.
Thank! -Elad
source
share