Twitter
"Facebook Like button" dynamic integration Send Print
Thursday, 15 July 2010
Component Resources
StatusIcon Status Revised

Hello,

I need to integrate "Facebook Like button" as some customers doesn't have time to develop communities and just want initially to spread through social media.

With a separator field and a code created here I get I like button in intro view as I wanted, but the problem is that I get a fix url (the one I defined when creating the code).

There is any fixing we could do to have this button there but having a dynamic url (url of the record and title of the record?)

 

This is a sample of code for the embedded

iframe:

<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fmywebsite.com%2Fportal%2Findex.php%3Foption%3Dcom_resource
%26view%3Dlist%26category_id%3D1744%26Itemid%3D321%26lang%3
Des&amp
;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like
&amp;colorscheme=light&amp;height=35" scrolling="no" frameborder="0"
style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true">
</iframe>

XFBML


XFBML is more flexible than iframes, but requires you use the JavaScript SDK.
Php files can be hacked in order to show this button but with a dynamic url?

 

Thanks a lot for your advice and support


cargenesAvatar
cargenes VIP
 
Votes: 0
Replies: 3
Hits: 1108


Comments
koraykupeAvatar
Quote
- -
Written by koraykupe VIP on 15 July 2010

 

<?php $pageURL = $_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]; ?>

You can use this codes for article templates:

<?php $pageURL = $_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];

echo "<iframe src=\"http://www.facebook.com/plugins/like.php?href=$pageURL&amp;layout=standard&amp;show_faces=false&amp;width=370&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=25\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:370px; height:25px;\" allowTransparency=\"true\"></iframe>"; ?>

 

 

But i think a field needed.

-
cargenesAvatar
Quote
- -
Written by cargenes VIP on 22 October 2010

Hi Koraykupe, I introduced this code and it gives me the button, it takes the link to your Facebook profile but it is a broken link. I'll thank you a lot if you could tell me if you know what to modify to the code to make it work. Have the I Like button with an static url is not very useful... Thanks a lot for the tip

-
cargenesAvatar
Quote
- -
Written by cargenes VIP on 29 July 2010

Hello Konstantine,

What do you think about this feature request. Technically possible to create a field plugin?

 

Now with separator I introduced button I like code but with a fix Url.

 

Thanks for your comments

-

Login to leave a comment

 
What is best way for Download/Installation MightyExtensions?
 


Member Area



Member Activity

We have 1658 guests and 6 members online


MightyTemplate - Professional Joomla Templates