WordPress.org

Forums

Smart Website Tools by AddThis
Facebook Share - No Thumbnail (5 posts)

  1. Samnabz
    Member
    Posted 1 year ago #

    Hi there,

    I am using your plugin (v3.5.2) to share ads on my WordPress (v3.6.1)/ClassiPress (v3.3) website.

    However, when you click on the Facebook share button, no thumbnail gets loaded/attached to the ad that is getting shared..?

    Here is a link to an ad on our site: http://tinyurl.com/o7ldyh5 (please do not post the actual link)

    I need your assistance to get the main ad image to show up as a thumbnail when sharing on Facebook. Alternatively, if the ad being shared has no image, it should pick up the website logo instead.

    Your earliest reply is appreciated and required.

    Thank you.

    http://wordpress.org/plugins/addthis/

  2. Srijith V
    AddThis Samurai
    Plugin Author

    Posted 1 year ago #

    @Samnabz: Your use case is a different one than how the share feature works. It picks up image from the page you are sharing and shows it. You may have to do some modifications on your site and get the image url of the ad. This image url have to be added as og:image (Read about open graph tag here) in the page from sharing occurs.

    Showing which image to be shown in FB share is determined by Facebook with the help of Opengraph tag.

  3. Samnabz
    Member
    Posted 1 year ago #

    @srijith.v: Thanks for getting back to me.

    Whilst the ads are 'posts', the ad images are not featured images - which I assume is the reason it doesn't pick them up...

    What can I do/customize in order to get the Image Opengraph to use the custom ad images when sharing on Facebook? I really need this to work!

    Your earliest reply is appreciated.

  4. Srijith V
    AddThis Samurai
    Plugin Author

    Posted 1 year ago #

    It is outside the scope of AddThis plugin to customize opengraph images. But you can try something like this in your theme file:

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

    where $imageUrl is the url to your custom ad image. You might need some logic to be added to grab the url to ad image and it depends on how you have implemented the ad code.

  5. Samnabz
    Member
    Posted 1 year ago #

    Hi srijith.v,

    Thanks for the reply. I tried using the (below) code to manually call the ad image. However, it ends up displaying the ad image on the page header (not supposed to) and still doesn't show up when sharing on Facebook...

    I know you said it's outside the scope of the plugin, but do you have any ideas as to why it is picking up the image but printing it on the page and not in the sharing tool??

    <meta property="og:image" content="<?php echo cp_get_image_url( $post->ID, 'thumbnail' ); ?>" />

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Smart Website Tools by AddThis
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic