I would like to give a different url in Facebook share button rather than current page url.
I've tried to change url in asp.net behind side but I wasn't success.
I would be gratefulif anyone can help about this.
Some codes that I used, you can see bellow.
this is front side script
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript">
</script>
<script type="text/javascript">
function fbs_click() {
u = location.href;
t = document.title;
window.open('http://www.facebook.com/share.php?u=' + encodeURIComponent(u) +
'&t=' + encodeURIComponent(t), 'share', 'toolbar=0,status=0,width=626,height=436');
return false;
}
</script>
this is share button
<a name="fb_share" runat="server" id="aFbShare" type="button" class="sharelink">Paylaş</a>
this is what I did on behind side
string wishListUrl = SEOHelper.GetWishlistUrl(NopContext.Current.User.CustomerGuid);
aFbShare.Attributes.Add("onclick", "fbs_click()");
aFbShare.Attributes.Add("target", "_blank");
aFbShare.HRef = "http://www.facebook.com/share.php?u=" + wishListUrl;