New Facebook Javascript API
UPDATE:
http://developers.facebook.com/docs/reference/javascript/FB.login
Only allowed to prompt for permissions due to a user action. Which is shitty, but I should have seen is documented.
I love the *looks* of the new Facebook javascript API. It's got one major flaw though. It doesn't work in Safari or Chrome. I have an app setup to use http://localhost:7000/ as the connect url and everything works *great* in Firefox. Things even work mostly ok in safari or chrome... but as soon as you try to launch the permissions dialog box you get the browser cycling through "unsafe javascript attempt to access frame with URL."
Best part about this whole thing is: the facebook developer forums throw the *same* error.
Also, when I try to create an account on the forums (not using facebook connect) I get a "cannot connect to socket" error.
I guess I go back to their older clunkier API? Seems to be a number of complaints but no answers from Facebook.
Any ideas?
UPDATE:
That error just keeps growing and growing.
I'm initializing my facebook like:
-
FB.init({
-
appId : '<myappid>',
-
status : true, // check login status
-
cookie : true, // enable cookies to allow the server to access the session
-
xfbml : true // parse XFBML
-
});
Minimal Repro:
If you put the following HTML at 127.0.0.1:7000 and hit the page you are UNABLE to do the following from the console:
-
FB.login(function (resp) { console.dir(resp);}, {perms: 'publish_stream'})
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
<html xmlns:fb='http://www.facebook.com/2008/fbml' xmlns='http://www.w3.org/1999/xhtml'>
-
Test page
-
</title>
-
</head>
-
<body class='mbx'>
-
-
<div id='fb-root'></div>
-
<script src="http://connect.facebook.net/en_US/all.js" type="text/javascript"></script>
-
<script type='text/javascript'>
-
//<![CDATA[
-
FB.init({
-
appId : '10562765058',
-
status : true, // check login status
-
cookie : true, // enable cookies to allow the server to access the session
-
xfbml : true // parse XFBML
-
});
-
//]]>
-
</script>
-
</body>
-
</html>
