WordPress.org

Support

Support » Plugins and Hacks » [Plugin: ShareThis: Share, Email, Tweet, Like, 1 Made Simple] Unable to set custom st_image propert

[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=”http://www.alpha-i.net/blog/meditation/a-simple-choice/” 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.

    http://wordpress.org/extend/plugins/share-this/

Viewing 1 replies (of 1 total)
  • sharethissupport
    Member

    @sharethissupport

    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.

    http://codex.wordpress.org/Meta_Tags_in_WordPress

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

    Regards,
    Neelam

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.