Try something like this:
function popupFB() {
var width = 400;
var height = 400;
var left = parseInt((screen.availWidth/2) - (width/2));
var top = parseInt((screen.availHeight/2) - (height/2));
var windowFeatures = "width=" + width + ",height=" + height + ",status,resizable,left=" + left + ",top=" + top + "screenX=" + left + ",screenY=" + top;
login_url = 'https://graph.facebook.com/oauth/authorize?client_id=APP_ID&scope=publish_stream&redirect_uri=window.location';
window.open(login_url, "mywindow", windowFeatures);
}
You need to add a custom login button that launches this function.
source
share