Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Community Contributed Add-Ons / All Other Contributions/Addons / Facebook "Like" Button on each product page - where to add FB details?

Facebook "Like" Button on each product page - where to add FB details?

Started by yaro on 5 Jun 2012, 2:50 PM · Views: 3,070

Results 1 to 3 of 3
5 Jun 2012, 2:50 PM
#1
yaro avatar

yaro

New Zenner

Join Date:
Apr 2012
Posts:
15
Plugin Contributions:
0

Post #1 by yaro

I somehow managed to add this "like" button to every product page (with the help of the addon), it kinda is there and kinda works... but every time somebody presses "like", the red "error" appears to the right, if you click on it it shows this:

The page failed to provide a valid list of administrators. It needs to specify the administrators using either a "fb:app_id" meta tag, or using a "fb:admins" meta tag to specify a comma-delimited list of Facebook users.
Facebook ©2012

Who can help me where in the code should I put the FB details (user? password?)

Site - www.a p t e k a r u s.com

Thanks in advance!

6 Jun 2012, 10:10 AM
#2
dgent avatar

dgent

Totally Zenned

Join Date:
Nov 2009
Location:
UK
Posts:
1,117
Plugin Contributions:
0

Post #2 by dgent

You really don't need any addons.

Just paste this link in your tpl_product_info_display.php

<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(zen_href_link(zen_get_info_page((int)$_GET['products_id']),'cPath='.(int)$_GET['cPath'].'&products_id=' . (int)$_GET['products_id'])); ?>&layout=standard&show_faces=false&width=300&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; display:none; overflow:hidden; width:300px; height:40px" onload="this.style.display = 'block';"></iframe>
6 Jun 2012, 10:26 AM
#3
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Post #3 by gilby

In your open graph tags<meta property="og:title" content="META_TAG_FBTITLE"/> <meta property="og:site_name" content=""/> <meta property="og:image" content="META_TAG_FBIMG"/> <meta property="og:url" content="http://aptekarus.com/index.php?main_page=product_info&products_id=200"/> <meta property="fb:admins" content="your app id or admin user ids"/> <meta property="og:type" content="product"/>and / or here ```
<script>
window.fbAsyncInit = function() {
FB.init({appId: 'your application id', status: true, cookie: true,
xfbml: true});
FB.Event.subscribe('edge.create', function(href, widget) {