Today I came across a very irritating issue. My JavaScript stopped working over night. When a user tries to create a FB action on my page there is a funky JS error:
Uncaught TypeError: Cannot read property '__wrapped' of null
Error occurs in the connect.facebook.net/en_GB/all.js:82 and it doesn’t make sense. In the error chain last line called from my script is FB.login(null, {scope: 'publish_actions'});. There is no AJAX called to Facebook. The JS SDK crashes before it gets anywhere. What is more annoying an old version of my script on different environment works so I can’t blame facebook. Do you have any idea where should I look for a problem?
The right syntax of FB.login is
Why are you passing null as the parameter? That should contain the function which will process the response received.
At the very least, pass it an empty function, with no body.
(Reference)