-
-
Save waqasy/24257bba4611518b4fc4 to your computer and use it in GitHub Desktop.
facebook share
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Share = {}; | |
Share.fb = function (link, title, sumary, image, winWidth, winHeight) { | |
var shareUrl = 'https://www.facebook.com/dialog/feed?'; | |
shareUrl += 'app_id=141676832590601'; | |
shareUrl += '&link=' + encodeURIComponent(link); | |
shareUrl += '&picture=' + encodeURIComponent(image); | |
shareUrl += '&name=' + title; | |
shareUrl += '&caption=' + ""; | |
shareUrl += '&description=' + sumary; | |
shareUrl += '&display=popup'; | |
shareUrl += '&redirect_uri=' + encodeURIComponent('http://www.facebook.com/dealextremefans'); | |
if (!winWidth) | |
winWidth = 400; | |
if (!winHeight) | |
winHeight = 300; | |
var winTop = (screen.height / 2) - (winHeight / 2); | |
var winLeft = (screen.width / 2) - (winWidth / 2); | |
window.open(shareUrl, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment