Saturday, 15 January 2011

javascript - How do you handle errors for Facebook SDK functions like FB.getLoginStatus()? -



javascript - How do you handle errors for Facebook SDK functions like FB.getLoginStatus()? -

under circumstances, using functions fb.getloginstatus() cause console errors such as:

given url not allowed application configuration.: 1 or more of given...

the problem if error occurs, callback function never gets called. there way handle errors of kind? try/catch doesn't work, , function doesn't homecoming directly. want avoid timeout hack if possible.

there nil in docs explaining how deal errors of kind either: https://developers.facebook.com/docs/reference/javascript/fb.getloginstatus

note: not trying solve error above, trying figure out handle it

that error happens if app not configured correctly, don´t need handle in code, need create sure add together platform right url in app settings (website, page tab, canvas app, ...).

everything else can handled in callback response, don´t need specific error handling that, code facebook docs. if settings correct, there response. meaning: error handling can done checking content of "response".

javascript facebook facebook-javascript-sdk

No comments:

Post a Comment