Add facebook share button




Simple Tutorial to Create Facebook Share Popup Window.

function facebookshare()
{
var url2='http://www.facebook.com/sharer.php?s=100&p[title]='+encodeURIComponent(' TITLE_OF_SHARE') + '&p[summary]=' + encodeURIComponent(' DESCRIPTION_TO_SHARE') + '&p[url]=' + encodeURIComponent(' URL_TO_SHARE ') + '&p[images][0]=' + encodeURIComponent(' IMAGE_TO_SHARE');
newwindow=window.open(url2," POPUP_WINDOW_HEADING",'height=480,width=680');
if (window.focus) {newwindow.focus()}

}

Note :- You can use encodeURIComponent('Text To Encode') javascript function to encode text into url format.

0 comments :