Facebook new js api and cross-domain file
Posted
by vondip
on Stack Overflow
See other posts from Stack Overflow
or by vondip
Published on 2010-05-09T20:39:31Z
Indexed on
2010/05/09
20:48 UTC
Read the original article
Hit count: 295
Hi all,
I am building a simple facebook iframe application. I've decided since the code is separate from facebook none the less, I will also create a connect website as well. In my connect website I'm trying to figure out the following:
I am using facebook's new api and I am calling the init function. I can't seem to figure out where I combine my cross-domain file. There's no mention of it in their documentation either. http://developers.facebook.com/docs/reference/javascript/FB.init
I am referring to these lines of code:
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({appId: 'your app id', status: true, cookie: true,
xfbml: true});
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>
© Stack Overflow or respective owner