Page 1 of 3 123 LastLast
Results 1 to 10 of 29
  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.

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

    Default Re: Meta_tag_fbtitle

    seriousoffroadproducts.com


    And while your there....BUY SUMTHIN'!!!


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

    Default Re: Meta_tag_fbtitle

    Well what does it say in the file html_header.php? In your active template. So the file will be

    includes/templates/darkness/common/html_header.php

    I am guessing that you have this line:

    Code:
    <meta property="og:title" content="<?php echo META_TAG_FBTITLE; ?>"/>
    If so then change it as described in my earlier post.

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

    Default Re: Meta_tag_fbtitle

    I did just as you described. Still seeing the same thing though.

    I even went thru every html_header.php file (custom templates, etc) and made the same change.

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

    Default Re: Meta_tag_fbtitle

    Well the code is appearing fine in your pages.

    But you do have a problem with the og:image tag which appears to be messing things up for you.

    You can use http://developers.facebook.com/tools/debug to see what I mean.

    As this isn't my mod, and I don't use it (instead I just wrote my own version of it ) , I can't really comment about why that is happening with this mod.

    What I do is add this line into the html_header.php file

    Code:
    <!--Add OG tags-->
    <?include(DIR_WS_MODULES . zen_get_module_directory('og_tags.php'));?>
    which just includes a module in that spot. I tend to put it under the generator meta-tag.

    Then in the modules folder ( either in default or in your template or both ) I put the file that is in the attachment.

    Then I upload a image to use as the default og:image to the images folder. It needs to be called og_logo.jpg.

    That seems to work pretty well for me. Of course, you'd want to remove the alterations that the previous mod had made to html_header.php.

    All that does is write the og:tags the way I want. I think that there are other things the previous module does - so you either need to leave those bits alone or recode them. What that means is use the rest of the previous module and just use my version to load the og:tags into the header.
    Attached Files Attached Files

 

 
Page 1 of 3 123 LastLast

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