Zen Cart Logo
Forums / All Other Contributions/Addons / Facebook Like Button

Facebook Like Button

Views: 52,534

Results 281 to 300 of 347
11 Feb 2012, 8:29 AM
#281
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

Facebook Like Button

MeltDown:

Sorry, did I miss the fix for the META_TAG_FBTITLE issue? It doesn't seem to be defined and therefore appears as the title in the post.

Thanks for your suggestions.

doing a search for that in particular would get you a few hits...this being one of them

http://www.zen-cart.com/forum/showthread.php?t=189527&highlight=META_TAG_FBTITLE

I get that ONLY if I post to our sites FB page by posting the link and do not get it when using the clickable link in our store that goes to my own account at FB

you might try it and see if it helps you or not

21 Feb 2012, 4:01 PM
#283
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Facebook Like Button

gopinathgoswami:

There is no problem with this particular mod and I do not appreciate your insistence that you have "fixed" my problem with another mod.

Please desist from posting in this thread.

To everyone else:

The META_TAG_FBTITLE shows up if you have installed any other like buttons on the website.

This like button was written for product pages only and therefore only pulls the product title for that.

If you have installed another like button for liking any page besides the products pages, that will show because there is no product title.

21 Feb 2012, 9:18 PM
#284
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

Re: Facebook Like Button

delia:

gopinathgoswami:

There is no problem with this particular mod and I do not appreciate your insistence that you have "fixed" my problem with another mod.

Please desist from posting in this thread.

To everyone else:

The META_TAG_FBTITLE shows up if you have installed any other like buttons on the website.

This like button was written for product pages only and therefore only pulls the product title for that.

If you have installed another like button for liking any page besides the products pages, that will show because there is no product title.

delia...I love this mod of yours and no fixes were needed at all

Now I did have troubles with posting but at first it was due to the wrong info I inserted into the coding then the images tend to get snippy and not want to post either...but that is not due to your mod.

FB is finicky at times and sometimes even clicking the link will get the meta title wording and not the actual title especially when I tried to post the link to our group and not just at my own FB page like it goes to shooooo

I added this line only to my own store: <meta property="og:title" content="<?php echo META_TAG_TITLE; ?>"/>

same place that your coding goes and now when I post to my group I see title/image in the post and yours is the ONLY FB mod I have installed too.

thank you for your mod.

22 Feb 2012, 11:04 PM
#285
lucamaz avatar

lucamaz

New Zenner

Join Date:
Feb 2012
Location:
Brescia, Italy
Posts:
3
Plugin Contributions:
0

Re: Facebook Like Button

Hi,
I'm Luca from Italy and I'm totally new to Zencart.
I'm creating my first zencart e-commerce site.
Now I'm trying to make work properly the Facebook Like.

Please, can you help me getting the product image and put it in the FB Like?
I've seen that on your "regimental-book.com.au" site all works very well. When I like a product, the FB Like catches the correct product image and use it to create the FB post.
When I "Like" any of my catalog product no image is loaded. An error message raises telling me that it wasn't able to find a proper image format.
The real issue is that "FB Like" doesn't recognize the product image and try to use the logo.png.

I'm going mad with that thing.
Please, save me! :)
Thanks in advance for anything you could do.

Have a nice life!
Luca Mazzotti

23 Feb 2012, 4:41 AM
#286
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

Re: Facebook Like Button

lucamaz:

Hi,
I'm Luca from Italy and I'm totally new to Zencart.
I'm creating my first zencart e-commerce site.
Now I'm trying to make work properly the Facebook Like.

Please, can you help me getting the product image and put it in the FB Like?
I've seen that on your "regimental-book.com.au" site all works very well. When I like a product, the FB Like catches the correct product image and use it to create the FB post.
When I "Like" any of my catalog product no image is loaded. An error message raises telling me that it wasn't able to find a proper image format.
The real issue is that "FB Like" doesn't recognize the product image and try to use the logo.png.

I'm going mad with that thing.
Please, save me! :)
Thanks in advance for anything you could do.

Have a nice life!
Luca Mazzotti

a link to your store would help alot in getting you assitance too.

but, did you put the code she said to write in the files in the readme.

23 Feb 2012, 9:54 AM
#287
lucamaz avatar

lucamaz

New Zenner

Join Date:
Feb 2012
Location:
Brescia, Italy
Posts:
3
Plugin Contributions:
0

Re: Facebook Like Button

DarkAngel:

a link to your store would help alot in getting you assitance too.

but, did you put the code she said to write in the files in the readme.
Hi DarkAngel,
my store is at this link: http://www.millecover.com/glitter-style-c-20/cover-apple-iphone-4-4s-glitterata-celeste-p-155

You told about a readme file with code inside, please, where can I find it?

23 Feb 2012, 10:25 AM
#288
lucamaz avatar

lucamaz

New Zenner

Join Date:
Feb 2012
Location:
Brescia, Italy
Posts:
3
Plugin Contributions:
0

Re: Facebook Like Button

DarkAngel:

a link to your store would help alot in getting you assitance too.

but, did you put the code she said to write in the files in the readme.
Here is the link to my store: http://www.millecover.com/glitter-style-c-20/cover-apple-iphone-4-4s-glitterata-celeste-p-155

I've made some test and I understand why FB try to load "logo.png".
It's my fault: I've put in the page header "meta property="og:image" setted on "logo.png".

What is the "readme" file you writing about?

23 Feb 2012, 7:56 PM
#289
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

Re: Facebook Like Button

lucamaz:

Here is the link to my store: http://www.millecover.com/glitter-style-c-20/cover-apple-iphone-4-4s-glitterata-celeste-p-155

I've made some test and I understand why FB try to load "logo.png".
It's my fault: I've put in the page header "meta property="og:image" setted on "logo.png".

What is the "readme" file you writing about?

In the zip you downloaded were the files to install this mod and there is a document called readme.txt in it is:

Instructions:



Contains 3 files, all of which go into template override folders.



includes/templates/your_custom_template/common/html_header.php

includes/templates/your_custom_template/templates/tpl_product_info.php

includes/modules/your_custom_template/metatags.php



Edit 2 files:



1) > includes/templates/your_custom_template/common/html_header.php



Find this code (line 25):

<meta property="fb:admins" content="184218714477"/>



and enter your application id or admin user ids between the quotes.  For most people this will be the application id which is obtained by registering your app/site at Facebook: http://developers.facebook.com/setup/



2) > includes/templates/your_custom_template/templates/tpl_product_info.php



Find this code (line 22):

FB.init({appId: 'your application id', status: true, cookie: true



and enter your application id between the single quotes.







Change "your_custom_template" to your template name. Upload each file to the appropriate folder.





For more information on integrating Facebook with websites: http://developers.facebook.com/docs/guides/web

and also:

this for the earlier versions...I suppose you are using 1.3.9h or are you using 1.5 zencart...either way I use 1.3.9h and also added these lines to my file:

2) html_header.php

Change the second line of the file to: <html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>> to 

<html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?> xmlns:fb="http://www.facebook.com/2008/fbml">



Add this code

 <meta property="og:title" content="<?php echo META_TAG_FBTITLE; ?>"/>

    <meta property="og:site_name" content="<?php echo TITLE; ?>"/>

    <meta property="og:image" content="<?php echo META_TAG_FBIMG; ?>"/>

     <meta property="og:url" content="<?php echo $canonicalLink; ?>"/>

     <meta property="fb:admins" content="your_application_id or facebook admins"/>

    <meta property="og:type" content="product"/>



anywhere before the </html> tag.  I added it after <meta name="author" content="The Zen Cart™ Team and others" />



3) metatags.php

Replace this code (line 210 in 1.3.8)

 $sql= "select pd.products_name, p.products_model, p.products_price_sorter, p.products_tax_class_id,

                                      p.metatags_title_status, p.metatags_products_name_status, p.metatags_model_status,

                                      p.products_id, p.metatags_price_status, p.metatags_title_tagline_status,

                                      pd.products_description, p.product_is_free, p.product_is_call,

                                      mtpd.metatags_title, mtpd.metatags_keywords, mtpd.metatags_description



with this



 $sql= "select pd.products_name, p.products_model, p.products_price_sorter, p.products_tax_class_id, p.products_image,

                                      p.metatags_title_status, p.metatags_products_name_status, p.metatags_model_status,

                                      p.products_id, p.metatags_price_status, p.metatags_title_tagline_status,

                                      pd.products_description, p.product_is_free, p.product_is_call,

                                      mtpd.metatags_title, mtpd.metatags_keywords, mtpd.metatags_description



4) metatags.php

Add this code (line 293 in 1.3.8):



    //bof facebook like button

    if($product_info_metatags->fields['products_image']!='') {

        $FBimgURL = (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ) . DIR_WS_IMAGES . $product_info_metatags->fields['products_image'];

        define('META_TAG_FBIMG', $FBimgURL); 

    } else {

        define('META_TAG_FBIMG', '');

    }

    define('META_TAG_FBTITLE', str_replace('"','',zen_clean_html($product_info_metatags->fields['products_name'])));

    //eof facebook like button



between this 



 } // CUSTOM META TAGS



and this



  } // EOF

  break;

I also added this additonal code to the file cause my store would not show the image if I just put the link into FB without using the button at the store cause it will show the images in my own account but not into our group account and now it does show it anywhere in FB I should post the link manually

<meta property="og:title" content="<?php echo META_TAG_TITLE; ?>"/>

We all make mistakes when manually adding something so don't worry about that. I would compare the files mentioned to see if the code is something that might help...make duplicates to work with then just upload the good one back if it messed things up

I did notice that in your source code you have the og:image content going to http://www.millecover.com/images/

I dropped the images/ part on mine since I have Image Handler and it will use the folder where these are located. Maybe try taking it off yours --might be confusing the software?? not sure.

20 Mar 2012, 5:08 AM
#290
tobindonal avatar

tobindonal

New Zenner

Join Date:
Oct 2010
Location:
ireland
Posts:
23
Plugin Contributions:
0

Re: Facebook Like Button

Using Zen 1.3.9h

have a heap of varying addons installed...

Love this addon, another great contribution...

Had a strange issue with it once installed, it worked fine, but for some reason the product descriptions on product pages were doubled up ? i.e. duplicate descriptions of the product...

Figured it was something to do the tpl_product_info_display
and after a compare to my original file i deleted the code below from file to resolve the problem

<!--bof Product description --> <?php if ($products_description != '') { ?> <div id="productDescription" class="productGeneral biggerText"><?php echo stripslashes($products_description); ?></div> <?php } ?> <!--eof Product description --> <br class="clearBoth" />

it works now and i'm stoked..

why i have no idea, do i care, not a bit :D

22 Mar 2012, 2:19 AM
#291
creinold avatar

creinold

Zen Follower

Join Date:
Sep 2008
Location:
North Highlands, California 95660
Posts:
287
Plugin Contributions:
0

Re: Facebook Like Button

you need to strip the html from the description tag try this fix.

Change

<?php echo stripslashes($products_description); ?></div>

to this:

<?php echo stripslashes(strip_tags($products_description)); ?>
25 Apr 2012, 11:48 PM
#292
themortician4 avatar

themortician4

New Zenner

Join Date:
Jan 2012
Location:
New Jersey
Posts:
75
Plugin Contributions:
0

Re: Facebook Like Button

Has this been released yet, or is it still in beta?

Email: [email protected]

26 Apr 2012, 7:01 PM
#293
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: Facebook Like Button

You obviously didn't read very far back. Link is in my signature below.

28 Apr 2012, 1:12 AM
#294
industrial avatar

industrial

New Zenner

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

Re: Facebook Like Button

Where could I get this add on?

:cool:

I like the new zen-cart forum layout.

28 Apr 2012, 4:23 AM
#295
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

Re: Facebook Like Button

industrial:

Where could I get this add on?

:cool:

I like the new zen-cart forum layout.

well you can look in with the rest of the downloads (using downloads link above in navigation) or in Delia's signature as she said in her post above yours.

But remember this is for 1.3.9h of zencart, not sure if it is ready for 1.5 yet

4 Jun 2012, 9:31 PM
#296
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

Re: Facebook Like Button

Delia,

I have just encountered this problem with version 1.3.9h

where I once had only the text link without the obnoxious button...it said Share then the product link I now have a button with no space

any ideas?

this is my code:

<!-- bof Facebook Like Button -->
   


    <div id="fb-root"></div>
    <script>
      window.fbAsyncInit = function() {
        FB.init({appId: 'DarkAngel612?ref=name', status: true, cookie: true,
                 xfbml: true});
        FB.Event.subscribe('edge.create', function(href, widget) {
// Do something, e.g. track the click on the "Like" button here
});
      };
      (function() {
        var e = document.createElement('script');
        e.type = 'text/javascript';
        e.src = document.location.protocol +
          '//connect.facebook.net/en_US/all.js';
        e.async = true;
        document.getElementById('fb-root').appendChild(e);
      }());
    </script>
<!-- eof Facebook Like Button -->

is there a way to use the smaller F for facebook if it insists on having the button?

oh I forgot I did also try to make the code like you have it only with the color background for darker backs but it only loaded the butoon and all at the top, not where I wanted it

5 Sep 2012, 1:51 AM
#297
serious avatar

serious

Totally Zenned

Join Date:
Feb 2011
Posts:
686
Plugin Contributions:
0

Re: Facebook Like Button

Can anyone tell me how to remove this add-on?

5 Sep 2012, 2:45 AM
#298
serious avatar

serious

Totally Zenned

Join Date:
Feb 2011
Posts:
686
Plugin Contributions:
0

Re: Facebook Like Button

zc 1.39h
Something about the add-on is causing some problems and I could use some help, assuming t's still being supported.

The Facebook spider has been crawling my site almost non-stop and damn near every time it shows up I see this on my Who's on Line page (in Admin).> Session ID:

Host: 69.171.237.14
User Agent: facebookexternalhit/1.0 (+http://www.facebook.com/externalhit_uatext.php)
/Soft-Tops/Smittybilt/META_TAG_IMG

The only place that I've found it is in the following file:
Facebook Like Button/includes/templates/your_custom_template/common/html_header.php

In my copy it's line 34, reads as follows

<meta property="og:image" content="<?php echo META_TAG_IMG; ?>"/>

Anyone able to help? PLEASE!!

5 Sep 2012, 7:02 AM
#299
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

Re: Facebook Like Button

change yours to read like this and see if that helps:

<meta property="og:image" content="<?php echo META_TAG_**FB**IMG; ?>"/>

I have used this mod since almost the beginning and do not have the problem you do.

5 Sep 2012, 11:34 AM
#300
serious avatar

serious

Totally Zenned

Join Date:
Feb 2011
Posts:
686
Plugin Contributions:
0

Re: Facebook Like Button

DarkAngel:

change yours to read like this and see if that helps:

<meta property="og:image" content="<?php echo META_TAG_**FB**IMG; ?>"/>

I have used this mod since almost the beginning and do not have the problem you do.Tried it, no difference.