HTML Body Code:
<a class="sns facebook_share" href="https://www.facebook.com/sharer/sharer.php?src=bm&u=http://www.google.com/maps" onClick="return fbs_click(600, 300)" target="_blank" title="Share This on Facebook"><span>facebook</span></a></div>
---------------------------------------------------
JavaScript Code:
<script type="text/javascript">
function fbs_click(width, height) {
var leftPosition, topPosition;
//Allow for borders.
leftPosition = (window.screen.width / 2) - ((width / 2) + 10);
//Allow for title and status bars.
topPosition = (window.screen.height / 2) - ((height / 2) + 50);
var windowFeatures = "status=no,height=" + height + ",width=" + width + ",resizable=yes,left=" + leftPosition + ",top=" + topPosition + ",screenX=" + leftPosition + ",screenY=" + topPosition + ",toolbar=no,menubar=no,scrollbars=no,location=no,directories=no";
u = location.href;
t = document.title;
window.open('https://www.facebook.com/sharer/sharer.php?src=bm&u=' + encodeURIComponent(u) + '&t=' + encodeURIComponent(t), 'sharer', windowFeatures);
return false;
}
</script>
0 comments:
Post a Comment