Fb.api Response Callback Async Popup Blocked
FB.api('/me', function(response) { // this is async //other logic goes here window.open(mylink + response.name); } The async problem make me can't do procedure programming style,
Solution 1:
You cannot open a popup in an asynchronous callback function, you always have to open it directly on user interaction. This is an important browser feature to protect the user from unwanted popups.
You definitely have to call FB.api BEFORE the user click. Should be no problem to call FB.api('/me')
right after initializing the JavaScript SDK and store it in a variable for later.
Post a Comment for "Fb.api Response Callback Async Popup Blocked"