Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Questions
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Important - The support forums are now in "read-only" mode as we transition to an alternative help desk solution. Feel free to contact us here with any of your questions or search the forums for an existing solution.
 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 29th, 2011, 02:14 PM
charlesk charlesk is offline
 
Join Date: Mar 2011
Posts: 43
Default Facebook "like" button in product detail page

Hi

is it possible to add to the products detail page the Facebook "like" button, so that when the user "likes" it, then he posts on his wall that he likes this product (linking to my product detail page)?

Kind regards
Charles
  #2  
Old March 29th, 2011, 02:28 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi Charles

I don't see why it wouldn't be possible but I've never used the "Like" button so I have no idea how to add it to a site.

Eric
  #3  
Old April 1st, 2011, 12:02 PM
charlesk charlesk is offline
 
Join Date: Mar 2011
Posts: 43
Default

I've done some experimenting with pasting the like button code in the text area in the product details view and this is what I noticed:

1) When pasting this:

<script src="http://connect.facebook.net/pl_PL/all.js#xfbml=1"></script><fb:like href="" show_faces="false" width="450" font="arial"></fb:like>

The button appears under each product but clicking it makes you "like" the whole store, not the particular product.

2) Pasting this:

<iframe src="http://www.facebook.com/widgets/like.php?href=<?php echo store_link('dfrp=' . $dfr_product_id); ?>"
scrolling="no" frameborder="0"
style="border:none; width:auto; height:24px;"></iframe>

totally destroys the layout.

3) Pasting this:

<iframe src="http://www.facebook.com/widgets/like.php?href="""
scrolling="no" frameborder="0"
style="border:none; width:auto; height:24px;"></iframe>


creates the like button, but with an url error.

Example:
http://www.fashionguide.pl/store/pas...3600984319869/

Thoughts - the iframe seems to be the good way, but I have now idea how to write the permalink in the "href" section. Any ideas?
  #4  
Old April 1st, 2011, 12:06 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

You could try this:
Code:
<script src="http://connect.facebook.net/pl_PL/all.js#xfbml=1"></script><fb:like href="[server.url type='fullpage']" show_faces="false" width="450" font="arial"></fb:like>
  #5  
Old April 1st, 2011, 12:14 PM
charlesk charlesk is offline
 
Join Date: Mar 2011
Posts: 43
Default

Same thing - it make the user "like" the store in general, not the particular product.

I've found a code for a Zen cart store that works on individual products, maybe it;s possible just to replace their permalinks with datafeedr's?

Code:
<iframe src="http://www.facebook.com/widgets/like.php?href=<?php echo urlencode(zen_href_link(zen_get_info_page((int)$_GET['products_id']),'cPath= '.$_GET['cPath'].' &products_id=' . (int)$_GET['products_id'])); ?>"
 scrolling="no" frameborder="0"
 style="border:none; width:auto; height:24px;"></iframe>
  #6  
Old April 1st, 2011, 12:21 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

It looks like the correct parameters are being passed to FB. Here's the source code:
HTML Code:
<script src="http://connect.facebook.net/pl_PL/all.js#xfbml=1"></script>
<fb:like 
	class="fb_edge_widget_with_comment fb_iframe_widget" 
	href="http://www.fashionguide.pl/store/paski/ochre-skinny-jean-belt-3600984319869/" 
	show_faces="false" 
	width="450" 
	font="arial"
>
<span>
<iframe 
	src="http://www.facebook.com/plugins/like.php?
		channel_url=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%3Fversion%3D0%23cb%3Df2934407fbf6422%26origin%3Dhttp%253A%252F%252Fwww.fashionguide.pl%252Ff187ee0cd893ce%26relation%3Dparent.parent%26transport%3Dpostmessage&amp;
		font=arial&amp;
		href=http%3A%2F%2Fwww.fashionguide.pl%2Fstore%2Fpaski%2Fochre-skinny-jean-belt-3600984319869%2F&amp;
		layout=standard&amp;
		locale=pl_PL&amp;
		node_type=link&amp;
		sdk=joey&amp;
		show_faces=false&amp;
		width=450" 
	class="fb_ltr" 
	title="Like this content on Facebook." 
	style="border: medium none; overflow: hidden; height: 23px; width: 450px;" 
	name="f2ad42f59342e6c" 
	id="f301a6606e29fc" 
	scrolling="no"
>
</iframe>
</span>
</fb:like>
Are you sure that you are not dealing with a caching issue. FB relies on heavy caching.

I can't test the like button as I don't have a FB account.

Eric
  #7  
Old May 26th, 2011, 08:37 AM
euroads euroads is offline
 
Join Date: May 2011
Posts: 6
Default

You need to need to add some facebook meta tags in your header in order to display the right information and pictures in your like post.

http://developers.facebook.com/docs/opengraph/

How do I get the datafeedr product tags to work in the header?

<!-- BEGIN FACEBOOK LIKE CODE -->
<meta property="og:site_name" content="mywebsite" />
<meta property="og:title" content="[product.name]"/>
<meta property="og:image" content="[product.image]"/>
<meta property="og:description" content="[product.description cut='255 chars']"/>
<!-- END FACEBOOK LIKE CODE -->
  #8  
Old May 26th, 2011, 09:02 AM
euroads euroads is offline
 
Join Date: May 2011
Posts: 6
Default

Nevermind, I can added it under View > View <head> Elements.

And you need to add [product.image direct='1' tag='0'] instead of [product.image]
  #9  
Old May 28th, 2011, 02:39 PM
tblogster tblogster is offline
 
Join Date: May 2010
Posts: 80
Default

euroads...
what effect did this have exactly?
  #10  
Old November 25th, 2011, 09:17 AM
GadgetStylist GadgetStylist is offline
 
Join Date: Oct 2009
Posts: 36
Default

Did you guys figure our a solution to this in the end? I'm very keen to add social liking to my store - this is becoming as important as SEO to driving traffic and engagement.

My previous employers were making 20 times higher revenue per visit from Facebook referral traffic than SEO so it would be good to build this into the store along with Twitter and +1.
  #11  
Old November 25th, 2011, 09:37 AM
GadgetStylist GadgetStylist is offline
 
Join Date: Oct 2009
Posts: 36
Default

I used this debug tool to try and figure on what's happening.

http://developers.facebook.com/tools/debug

Looks like the rel canonical is pointing Facebook back at the home page of my store rather than pulling OG data from my page.

Any thoughts on how to fix this?
  #12  
Old January 8th, 2012, 05:18 PM
roelkers roelkers is offline
 
Join Date: Nov 2011
Posts: 24
Default

Howdy folks. Anyone able to get Facebook Like working.

Have a wordpress site and the Facebook Like plugin doesn't even show up on the datafeedr store product pages. Also, no luck with Google +1. Wp Tweet Button plugin shows up on these product pages but when you click to Tweet it just posts the store's homepage rather than the actual product page, regardless of which product page you're on.

No good, have to find a solution to utilize social media marketing.
  #13  
Old June 19th, 2012, 09:15 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Here's how to add the Facebook Like button to your Product Detail page: http://www.datafeedr.com/forums/show...2741#post32741
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:45 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.