I am trying to customize the facebook share button popup window's text.
I used the official facebook share button generator located here but that only let's you use their buttons.
So I setup some custom code so I could use a custom button of my choice. The only problem is with this custom solution, the popup window wants to include the entire text of my wordpress post and it's all jumbled and way too long.
I would like to be able to set custom share text for each wordpress post. Somehow with the code below if possible.
Here's my javascript code:
<script language="JavaScript">
<!--
function PopUp(URL) {
window.open(URL, 'Windowname', 'width=550, height=400, toolbar=0, scrollbars=1 ,location=0 ,statusbar=0,menubar=0, resizable=0');
}
//-->
</script>
And then here's my facebook share code with my custom button image:
<div class="fb_btn"> <a href="javascript:PopUp('http://www.facebook.com/sharer.php?u=http://www.mysite.com/random-wordpress-post/')"><img src="http://www.mysite.com/share-to-facebook/shareonfacebook.jpg" alt="shareonfacebook" width="312" height="52" class="aligncenter size-full wp-image-96" /></a>
</div>
I know that this is possible because if you go here: http://www.viralnova.com/baby-boy-alive-10-days/
And then scroll down you will see they have a big blue button that says "Share on Facebook" and if you click that button the popup window's text is "I can't hold back my tears. This is a must see." which you will notice is NOT located anywhere in the article.
So somehow this person is able to set a custom share text for each post. I need to do the same.
Thanks for the help.