Hi, I have created an application which uses fbconnect. The application uses new facebook graph api(javascript sdk). The problem is do not close the authentication popup window after authenticating. It shows a blank page. My code is
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({appId: mixin.fb_connect_apiId, status: true, cookie: true, xfbml: true});
/*FB.Event.subscribe('auth.login', function(response) {
// do something with response
next();
});*/
};
(function() {
var e = document.createElement('script');
e.type = 'text/javascript';
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
$('#fb_connect').bind('click', function() {
FB.login(function(response){
if(response.session){
alert("fbconnected!!");
//next();
}else{
alert("couldn't fbconnect!!");
}
},{perms:'offline_access,publish_stream,rsvp_event'});
});
</script>