Reputation: 2771
I have jquery dialog on my website. It pops up when page is loaded. I want to give my dialog facebook functionality (like button).
Now I want to:
Please note I don't have any application ID associated with my page (when it comes back). Any ideas?
Thank you!
Upvotes: 0
Views: 101
Reputation: 15550
There is no way to do that because of Same Origin Policy. You can only do that with FB API like;
FB.api('/me/likes/your_page_id', {limit: 1}, function(response) {
if (response.data.length == 1) {
// User already liked your page, do not open dialog
} else {
// $("#dialog").dialog(); User not liked your page
}
});
For detect when user click, you can use;
FB.Event.subscribe('edge.create',
function(response) {
// User clicked like button
}
);
You can create FB App here
Upvotes: 1