Support » Plugin: ShareThis: Free Sharing Buttons and Tools » [Plugin: ShareThis: Share, Email, Tweet, Like, 1 Made Simple] Unable to set custom st_image propert

  • I’m using the sharethis plugin for wordpress and I’m having some issues with my featured image not appearing when I share a post on facebook. I’m trying to override this by specifying an ‘st_image’ parameter in the HTML code settings on the options page. I’ve modified the facebook share button to the following:

    <span class=’st_facebook_hcount’ st_title='<?php the_title(); ?>’ st_url='<?php the_permalink(); ?>’ st_image='<?php echo wp_get_attachment_url(get_post_thumbnail_id($post->ID)); ?>’ displayText=’share’>

    However, for some reason, the PHP after st_image= doesn’t get parsed. The code renders on the page as:

    <span class=”st_facebook_hcount” st_title=”A simple choice” st_url=”” st_image=”<?php wp_get_attachment_url(get_post_thumbnail_id($post->ID)); ?>” displaytext=”share”></span>

    Is this a bug in the plugin? Any suggestions would be appreciated.

Viewing 1 replies (of 1 total)
  • Hi,
    The ShareThis widget tries to automatically pick the best image from the url you share , but sometimes our algorithm doesn’t pick it up for some reason or another.

    Sharethis facebook button implements a direct post, meaning user is redirected to the website. Because of this, Facebook is responsible for crawling information from the page. They do this via meta tags. If these tags do exist on the page, Facebook will display that information in the post.

    Facebook uses properties “description” and “title” in the meta tags.

    WordPress has ways to put meta tags. Typically, this is done in the header.php template for the theme.

    There are also wordpress plugins that setup these tags automatically. Yoast WordPress SEO is one of them.


Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: ShareThis: Share, Email, Tweet, Like, 1 Made Simple] Unable to set custom st_image propert’ is closed to new replies.