79083321

Date: 2024-10-13 14:15:13
Score: 1
Natty:
Report link

I encountered the same issue, seems like FB sdk doesn't like us passing async function because they stuck on 2010. the stupid workaround I needed to do is pass a regular function, which calls an async function that has it's own try-catch inside

const myAsyncFunction = async (response) => {
 try {
     // Logic goes here...
   } catch (e) {}
}

 FB.login(function() {
    myAsyncFunction() // we don't await here
})
Reasons:
  • Blacklisted phrase (0.5): I need
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Ron Dahan