Results 1 to 10 of 16

Hybrid View

  1. #1

    Default Re: Facebook LIKE button adds wrong picture

    Quote Originally Posted by dgent View Post
    Yes, add this code to your html_header.php

    <meta property="og:title" content="<?php echo META_TAG_TITLE; ?>" />
    <meta property="og:type" content="product" />
    <meta property="og:site_name" content="<?php echo STORE_NAME; ?>" />
    <meta property="og:fb_admin" content="your Facebook admin number if you're using FB insights" />

    <?php
    if (isset($_GET['products_id'])) { // use products_image if products_id exists
    $facebook_image = $db->Execute("select p.products_image from " . TABLE_PRODUCTS . " p where products_id='" . (int)$_GET['products_id'] . "'");
    $fb_image = HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . $facebook_image->fields['products_image'];
    }
    if ($fb_image == '') { // if no products image, use the default image if enabled
    $fb_image = 'insert a default image url here';
    }
    if ($fb_image != '') {
    ?>
    <meta property="og:image" content="<?php echo $fb_image; ?>" />
    <?php
    }
    ?>
    What is the path to html_header.php? I can't seem to locate it in my FTP??

  2. #2
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,090
    Plugin Contributions
    0

    Default Re: Facebook LIKE button adds wrong picture

    includes/templates/YOUR_TEMPLATE/common

  3. #3

    Default Re: Facebook LIKE button adds wrong picture

    Quote Originally Posted by dgent View Post
    includes/templates/YOUR_TEMPLATE/common
    OK, found that but now, where do I add your code? I tried adding to the top of the page and it killed the online cart...

  4. #4
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,090
    Plugin Contributions
    0

    Default Re: Facebook LIKE button adds wrong picture

    Its metatags, so add it under the metatag title tag.

    <title><?php echo META_TAG_TITLE; ?></title>

  5. #5

    Default Re: Facebook LIKE button adds wrong picture

    Quote Originally Posted by dgent View Post
    Its metatags, so add it under the metatag title tag.

    <title><?php echo META_TAG_TITLE; ?></title>
    OK, that worked a little better, but I got an error on the page that linked to this detail on Facebook:

    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.

  6. #6
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,090
    Plugin Contributions
    0

    Default Re: Facebook LIKE button adds wrong picture

    Sorry, yes the fb admin line should have said..

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

  7. #7

    Default Re: Facebook LIKE button adds wrong picture

    That seems to work! I did get the proper photo in the Facebook post however, I am still getting an error after I LIKE it on my shopping page...

    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.
    Here is a screen cap of the error:
    Attached Images Attached Images  

 

 

Similar Threads

  1. Facebook Like Button
    By delia in forum All Other Contributions/Addons
    Replies: 346
    Last Post: 11 Feb 2016, 09:01 PM
  2. Facebook like button
    By petestownrich in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 18 Feb 2015, 07:02 PM
  3. v151 facebook like button
    By ken1 in forum General Questions
    Replies: 0
    Last Post: 14 May 2014, 07:03 PM
  4. facebook like button and google + button in Header.
    By Horrific_ending in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 4 Jan 2012, 04:46 PM
  5. Facebook like button
    By rdsbaker in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 25 Mar 2011, 07:00 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