Announcement

Collapse
No announcement yet.

og:image

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    og:image

    Hi all,

    Am hopeful that through helping me resolve this, others in a similar position may "see the light" with the og:image meta property of facebooks open graph.

    website: http://snowsun.com
    actinic software: v10.

    Objective: Displaying the correct associated image within facebook once user has liked particular product. ~All "information" (Name, Link, Website) other than image appears to work.

    Insight: I use a single section per product.

    Currently applied code:

    <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Section%22" >
    <actinic:block type="ProductList" />
    <actinic:block if="%3cactinic%3avariable%20name%3d%22ListIndex%22%20%2f%3e%20%3d%3d%201">
    <meta property="og:title" content="<actinic:variable encoding="strip" name="PageTitle" />" />
    <meta property="og:type" content="product" />
    <script type="text/javascript">
    document.write ('<meta property="og:url" content="'+window.location+'" />');
    </script>
    <actinic:block if="%3cactinic%3avariable%20name%3d%22ProductImageFileName%22%20%2f%3e%20%21%3d%20%22%22">
    <meta property="og:image" content="<actinic:variable name="CatalogURL" /><actinic:variable name="ProductImageFileName"/>" />
    </actinic:block>
    <meta property="og:site_name" content="SnowSun Adrenaline Sports" />
    <meta property="fb:app_id" content="xxx-xxx-xxx"/>
    </actinic:block>
    </actinic:block>
    </actinic:block>

    When testing with the Object debugger provided by facebook I get the following:

    Errors that must be fixed

    Object Type Not Allowed Object at URL 'http://snowsun.com/acatalog/Armada-Jacket-Womens_Ino-Prism-2012_UK.html' of type 'og_productsroduct' is invalid because it the specified fb:app_id 'xxx-xxx-xxx' is not the owner of specified og:type.
    Missing Required Property The og:url property is required, but not present.
    Missing Required Property The og:type property is required, but not present.
    Missing Required Property The og:title property is required, but not present.

    Raw Open Graph Document Information

    Meta Tag <meta property="og:title" content="Armada Ino : Prism | Winter Jackets | Women's | Apparel | SnowSun.com - UK | Suffolk | Ipswich" />
    Meta Tag <meta property="og:type" content="product" />
    Meta Tag <meta property="og:image" content="http://snowsun.com/acatalog/C:\Documents and Settings\All Users\Documents\Actinic v10\Images\Armada\Armada-2012-Jacket-Womens_Ino-Prism_PP.jpg" />
    Meta Tag <meta property="og:site_name" content="SnowSun Adrenaline Sports" />
    Meta Tag <meta property="fb:app_id" content="xxx-xxx-xxx" />

    I can see that the og:image isn't taking what I would expect the path to be... It's adding the local location of the stored image files, which is what's bugging me!! -Error -Error -Error ! ! !

    Any help would be helpful... ;o)

    #2
    Is there an Actinic Variable?

    Does anyone know which actinic variable I have to use to reference just the image file name (E.g. a-picture.jpg)?

    Ty.

    Comment


      #3
      I'm not the expert on this but I don't think there is one.

      You can remove the image path in PHP. See this thread: http://community.actinic.com/showthread.php?t=48900

      Mike
      -----------------------------------------

      First Tackle - Fly Fishing and Game Angling

      -----------------------------------------

      Comment


        #4
        Originally posted by Mike Hughes View Post
        I'm not the expert on this but I don't think there is one.

        You can remove the image path in PHP. See this thread: http://community.actinic.com/showthread.php?t=48900

        Mike
        Thanks Mike. I had reviewed other threads and discovered PHP held the key, but couldn't find the exact code I needed... Thankfully your referenced threat led me to the required code.

        Shall post my revised 'Tested' and working code.

        Comment


          #5
          Working: Actinic (v10) &amp; Open Graph Social Media Meta

          <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Section%22" >
          <actinic:block type="ProductList" />
          <actinic:block if="%3cactinic%3avariable%20name%3d%22ListIndex%22%20%2f%3e%20%3d%3d%201">
          <meta property="og:title" content="<actinic:variable encoding="strip" name="PageTitle" />" />
          <meta property="og:type" content="product" />
          <script type="text/javascript">
          document.write ('<meta property="og:url" content="'+window.location+'" />');
          </script>
          <actinic:block if="%3cactinic%3avariable%20name%3d%22ProductImageFileName%22%20%2f%3e%20%21%3d%20%22%22">
          <meta property="og:image" content="<actinic:variable name="CatalogURL" /><actinic:block php="true" >$path_parts = pathinfo('<actinic:variable name="ProductImageFileName" encoding="perl" selectable="false" />');echo $path_parts['basename'], "\n";</actinic:block>" />
          </actinic:block>
          <meta property="og:site_name" content="SnowSun Adrenaline Sports" />
          <meta property="fb:app_id" content="xxx-xxx-xxx"/>
          </actinic:block>
          </actinic:block>
          </actinic:block>


          Am a little wary of the code I've used and placed... This works so will run with it... If you know better please feel free to advise.

          Comment


            #6
            How would i alter this to use the extend product image instead of the standard product image?

            James
            www.butterflies-healthcare.co.uk
            www.viteyes.co.uk - vitamins for macular degeneration
            www.natorigin.co.uk - natural/organic cosmetics and skin care for sensitive skin & eyes
            www.butterflies-eyecare.co.uk - eye drops, vitamins and other eye care products
            www.prescription-swimming-goggles.co.uk - optical and prescription swimming goggles

            Comment


              #7
              Replace ProductImageFileName with ExtendedInfoImage.

              P.S. That:
              Code:
              <actinic:block php="true" >$path_parts = pathinfo('<actinic:variable name="ProductImageFileName" encoding="perl" selectable="false" />');echo $path_parts['basename'], "\n";</actinic:block>
              Can be better done via:
              Code:
              <actinic:block php="true" >echo basename(str_replace('\\', '/', '<actinic:variable name="ProductImageFileName" encoding="perl" selectable="false" />')), "\n";</actinic:block>
              The str_replace deals with quirks whereby SellerDeck uses \ in path names and this can inadvertently escape following characters.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment

              Working...
              X