Results 1 to 10 of 29

Hybrid View

  1. #1
    Join Date
    Sep 2011
    Posts
    226
    Plugin Contributions
    0

    Default Meta_tag_fbtitle - Facebook Addon

    Hi

    When ever one posts a link, that is not a product page on Zen-Cart, to facebook (for example the home page of your website), instead of Facebook showing the title of your website (or the title of the page), it shows "META_TAG_FBTITLE"

    I have seen another thread asking about this problem, but no proper solution was given.

    Is there a solution to this problem?

    Thanks for your help.
    S

    Edit:

    Facebook will be getting the info from here:

    /home/pcselect/public_html/includes/modules/meta_tags.php

    PHP Code:
    Line #285 : define('META_TAG_FBTITLE', str_replace('"','',zen_clean_html($product_info_metatags->fields['products_name']))); 
    How can we add the title of other pages to this?
    Last edited by SethF; 6 Dec 2011 at 10:21 AM. Reason: Added information

  2. #2
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Meta_tag_fbtitle

    I suspect that you are using a mod for a facebook like button? The mod may be called 'facebook like button'? Just guessing....

    If so you have added this line, and others to your html_header.php file

    Code:
     <meta property="og:title" content="<?php echo META_TAG_FBTITLE; ?>"/>
    As you noted this only works for product pages, Personally I don't see the reason not to just use:

    Code:
     <meta property="og:title" content="<?php echo META_TAG_TITLE; ?>"/>
    which just uses the page title meta tag for the og:title. Perhaps someone with more knowledge of facebook can explain why that is a bad idea? If not then I would just use that.

    Having said that you could edit the meta_tags.php file that this module uses to set the META_TAG_FBTITLE to it's choice for product pages and to the META_TAG_TITLE for all the other pages.
    Last edited by niccol; 6 Dec 2011 at 11:02 AM. Reason: clarity

  3. #3
    Join Date
    Sep 2011
    Posts
    226
    Plugin Contributions
    0

    Default Re: Meta_tag_fbtitle

    Quote Originally Posted by niccol View Post
    I suspect that you are using a mod for a facebook like button? The mod may be called 'facebook like button'? Just guessing....

    If so you have added this line, and others to your html_header.php file

    Code:
     <meta property="og:title" content="<?php echo META_TAG_FBTITLE; ?>"/>
    As you noted this only works for product pages, Personally I don't see the reason not to just use:

    Code:
     <meta property="og:title" content="<?php echo META_TAG_TITLE; ?>"/>
    which just uses the page title meta tag for the og:title. Perhaps someone with more knowledge of facebook can explain why that is a bad idea? If not then I would just use that.
    This worked like a charm.


    Having said that you could edit the meta_tags.php file that this module uses to set the META_TAG_FBTITLE to it's choice for product pages and to the META_TAG_TITLE for all the other pages.
    I am not sure what you mean here, or why this is necessary.

    Thanks again.

  4. #4
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Meta_tag_fbtitle

    Quote Originally Posted by SethF View Post
    This worked like a charm.

    I am not sure what you mean here, or why this is necessary.

    Thanks again.
    Well, for whatever reason the author of the module decided to use something other than the obvious page title. I do not claim to be a facebook expert so cannot comment about why that is, or is not, a good idea. If you wanted to follow their procedure then you'd have to alter the meta-tags.php file that they include in their module so that it produces alternate og:title tags for all pages rather than just for the product_info pages.

    As I say, I personally think that the page title is the obvious choice here. But there may be facebook, or possibly SEO, reasons why you'd want to use something else instead. If someone can come up with a persuasive argument then it is probably worth listening to.

    Until then I'd stick with what you have now.

  5. #5
    Join Date
    Feb 2011
    Posts
    665
    Plugin Contributions
    0

    Default Re: Meta_tag_fbtitle

    I've got the same issue....but not on every link that i add to my FB page. Weird...

    I've edited my html_header.php as shown above but I still get the darn "META_TAG_FBTITLE" on some links I try to put on my FB pag, others it shows the page or product title.

    Any other suggestions?

  6. #6
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Meta_tag_fbtitle

    You need to post a URL for the site. Without that it is almost impossible to comment.

    Also if you wanted to zip your html_header.php file and attach it to a post then that would help people help you.

 

 

Similar Threads

  1. v139h Facebook like addon weird appearance on facebook activity
    By navido in forum General Questions
    Replies: 0
    Last Post: 7 Sep 2014, 06:34 PM
  2. v150 Trouble with facebook addon...
    By rainbow_pixie_star in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 22 Jul 2012, 08:55 AM
  3. META_TAG_FBTITLE in my Facebook links
    By duiwel in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 23 May 2012, 02:56 AM
  4. Facebook addon mod doesn't incorporate PHPBB support
    By HaIzI72G3T in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 6 Dec 2011, 01:36 AM
  5. Facebook addon problems
    By Maynards in forum All Other Contributions/Addons
    Replies: 14
    Last Post: 22 Apr 2010, 03:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg