Jump to content

Facebook I like button not working correctly


Recommended Posts

Hi guys,

I am trying to put several i like buttons in my category page and for some reason i cannot make it.
Someone did this before? Mainly I was following two pages
http://hillarsaare.com/multiple-facebook-like-buttons-on-one-page/comment-page-1/
and the official one from FB
http://developers.facebook.com/docs/reference/plugins/like

What I do is to create the metatags in header.php depending of the parameters on the URI.
and then include in the category.tpl the button as indicated in the first link

                
 show_faces="false" width="240" height="40"
 action="like" colorscheme="light" ref="MDA{$product.id_product|intval}">



the buttons appear and the metatags are generated depending of the parameters in the URI but the post in FB is wrong, doesnt include an image or a proper link. Seems like the URL parameters are ignored or something...

http://v2.muertosdearte.com/categoryFull.php?id_category=7&id_product=14
thanks in advance for any suggestion.
jose

Link to comment
Share on other sites

Thing is you use other arguements like "&id;=" to show the correct productid, the FB link from the iframe will show it correctly in your output hower won't post it correctly to your profile.

This has to do with the fact that the character "&" isn't reconised in some way by the FB platform.

As hillarsaare does it in your posted link I would suggest you take a look at mod_rewrite, good way to learn it can be found on following page: http://articles.sitepoint.com/article/guide-url-rewriting

I'm also looking for a solution to workaround it without the mod_rewrite for url's since I don't want to mess with my httpd.conf.
If I find the workaround I'll let you know.

I also posted it on the facebook platform developpers forum in case any helpfull reply comes up you can also read it there: http://forum.developers.facebook.net/viewtopic.php?id=84688

Regards

Beno

Link to comment
Share on other sites

Hi and thanks Beno,

yes, i knew that page but my problem is that I need to create several buttons in the same page
http://www.muertosdearte.com/categoryFull.php?id_category=9

if I use that iframe it appears the same for all the products and I would like to have an independent one with the different meta tags for each item....


any suggestion for this?

thanks a lot anyway.
jose

Link to comment
Share on other sites

  • 3 months later...
Hi guys,

I am trying to put several i like buttons in my category page and for some reason i cannot make it.
Someone did this before? Mainly I was following two pages
http://hillarsaare.com/multiple-facebook-like-buttons-on-one-page/comment-page-1/
and the official one from FB
http://developers.facebook.com/docs/reference/plugins/like

What I do is to create the metatags in header.php depending of the parameters on the URI.
and then include in the category.tpl the button as indicated in the first link

                
 show_faces="false" width="240" height="40"
 action="like" colorscheme="light" ref="MDA{$product.id_product|intval}">



the buttons appear and the metatags are generated depending of the parameters in the URI but the post in FB is wrong, doesnt include an image or a proper link. Seems like the URL parameters are ignored or something...

http://v2.muertosdearte.com/categoryFull.php?id_category=7&id_product=14
thanks in advance for any suggestion.
jose



Main body

function getAddress()
{
/*** check for https ***/
$protocol = $_SERVER['HTTPS'] == 'on' ? 'https' : 'http';
/*** return the full address ***/
return $protocol.'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
}

fblike button

<?php echo'[removed][removed]' ?>

www.dreegonnetworks.com
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...