Page 1 of 1

Facebook Link for LINKIT bookmarks

Posted: Thu 18. Oct 2007, 11:16
by 360fusion
Hi

I have added a link to add webpages to Facebook to add on to the [LINK_IT] tag.


All you need to do is add these lines of code to linkme.php in template/inc_script/frontend_render.

Code: Select all

$bm['service']['facebook']['url']		 = 'http://www.facebook.com/sharer.php?u='.$bm['url'].'&exttitle='.$bm['title'].'&extdesc='.$bm['bodytext'];
$bm['service']['facebook']['alt']		 = 'Facebook';
Download the image for the Facebook icon here:

http://static.ak.facebook.com/images/sh ... f?12:26981

then rename it to facebook and upload it to: template/img/bookmarklets.

the just add {FACEBOOK} to your template or web page with all the other LINKIT tags.

With Facebook the login page should open up in a small window controlled by javascript. I couldn't find a way to add this to the link. If anyone else knows how please let me know.


I have created this by hacking together some code supplied by facebook and mashing it with other code already in linkme.php. I'm not a php expert so if anyone spots any errors please point them out.

face book code

Code: Select all

<script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><style> html .fb_share_link { padding:2px 0 0 20px; height:16px; background:url(http://static.ak.facebook.com/images/share/facebook_share_icon.gif?12:26981) no-repeat top left; }</style><a href="http://www.facebook.com/share.php?u=<url>" onclick="return fbs_click()" target="_blank" class="fb_share_link">Share on Facebook</a>
Hope someone finds this useful.

Ben

<!--DETAIL_ONLY-->
[LINK_IT]
<p>{WONG} {DIGG} {DELICIOUS} {TECHNORATI} {SPURL} {FURL} {YAHOO} {GOOGLE} {MAGNOLIA} {NEWSVINE} {REDDIT} {FACEBOOK}</p>
[/LINK_IT]

Posted: Mon 22. Oct 2007, 16:50
by Oliver Georgi
You code is a bit wrong but Facebook Bookmarklet is now official part of linkme.php.

Code: Select all

	$bm['service']['facebook']['url']	 = 'http://www.facebook.com/sharer.php?u='.$bm['url'].'&t='.$bm['title'];
	$bm['service']['facebook']['alt']	 = 'Share on Facebook';
And rename the icon to "facebook.gif"

Oliver

Posted: Mon 22. Oct 2007, 17:14
by 360fusion
Hi Oliver,

Thanks for that, I'll update my current sites and look forward to the next release.

Thanks
Ben

Re: Facebook Link for LINKIT bookmarks

Posted: Fri 12. Mar 2010, 15:18
by zuker
Hi
It would be nice to have bookmarktag {BUZZ} to add webpage link to Google Buzz service.