Create a gist now

Instantly share code, notes, and snippets.

Facebook share popup JS function, popup window in screen center.
function fbShare(url, title, descr, image, winWidth, winHeight) {
var winTop = (screen.height / 2) - (winHeight / 2);
var winLeft = (screen.width / 2) - (winWidth / 2);'[title]=' + title + '&p[summary]=' + descr + '&p[url]=' + url + '&p[images][0]=' + image, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight);

Sorry to say, but this is not working... The Facebook server is throwing up an error about the link!


not working man


Facebook stopped supporting sharer.php, instead you can use Facebook dialog for sharing content.

Check URL redirection from the above post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment