I've set up a simple app to run in a page tab. After authorizing the use of the app, just for basic info, it checks if the user likes the page. If they don't it asks for you to like the page before proceeding - but if you click the LIKE button at that point it's not refreshing the page so I don't see the change in my app. The user is left hanging and has to click the page tab again to proceed, at which point it lets you in. If you like the page before starting, everything works fine and the LIKE button refreshes the page as normal.
Is there a reason for this? Or am I missing a trick - should I add my own LIKE button or something?
Help appreciated as I'm really new to facebook apps.
EDIT - I'm using Asp.Net C# if that makes a difference. I found it very hard to find any good documentation so I've pieced this together as best I can, so excuse the messiness. Here's the HTML page code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
FB.init({
appId: '9999999999',
status: true, // check login status
cookie: true, // enable cookies to allow the server to access the session
xfbml: true // parse XFBML
});
window.fbAsyncInit = function () {
FB.Canvas.setSize({ width: 520, height: 1300 });
}
// Do things that will sometimes call sizeChangeCallback()
function sizeChangeCallback() {
FB.Canvas.setSize({ width: 520, height: 1300 });
}
Enter our competition
You must LIKE our page before you can enter the competition
Q1 Q2 Q3
Q4 Q5 Q6
You have already entered this week's competition.
window.fbAsyncInit = function () {
FB.init({ appId: '9999999999', status: true, cookie: true, xfbml: true, oauth: false });
// If like button pressed, refresh page
FB.Event.subscribe('edge.create', function (response) { top.location = '
http://www.facebook.com/pages/MY_PAGE_NAME/PAGE_ID?sk=app_9999999999'; });
};
(function () {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
} ());
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)