Support » Plugin: AddToAny Share Buttons » Customize Shared Content on Facebook Link

  • Resolved wrknight

    (@wrknight)


    I am using add-2-any share buttons to create a share link to Facebook. The share button works, but when a reader shares my blog post on his Facebook page he sees a box containing the name of my site, the title of the blog post and a few lines of text that have no bearing on the post. If the reader posts the link, he sees exactly the same thing, but now it links back to my blog post as it should. I wish to replace those irrelevant lines of text with the first few lines from the post itself, but I can’t find any way to do this. I have tried 3 other social share plugins with exactly the same results. In addition to revising the text, it would be nice (but not necessary) to be able to customize the dimensions of the box and the style and layout of the content.

    Any help would be greatly appreciated.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author micropat

    (@micropat)

    Your site’s pages need meta tags. See the AddToAny plugin’s FAQ on Facebook sharing.

    I am still at a loss.

    Being a WordPress blog with the 2015 theme, a template is used to display the home page and each of the blog posts. The theme header file is the only place that I know of to place the recommended text. That file presently contains the following:

    <head>
    	<meta charset="<?php bloginfo( 'charset' ); ?>">
    	<meta name="viewport" content="width=device-width">
    	<link rel="profile" href="http://gmpg.org/xfn/11">
    	<link rel="pingback" href="<?php echo esc_url( get_bloginfo( 'pingback_url' ) ); ?>">
    	<!--[if lt IE 9]>
    	<script src="<?php echo esc_url( get_template_directory_uri() ); ?>/js/html5.js"></script>
    	<![endif]-->
    	<?php wp_head(); ?>
    </head>

    The code I am advised to add is:

     <meta property="og:title" content="Example Page">
    <meta property="og:image" content="https://example.com/images/image.jpg">
    <meta property="og:description" content="This is just an example page.">
    <meta property="og:url" content="https://example.com/page.html">
    <meta name="twitter:card" content="summary_large_image">

    At this point, I don’t see how I can put in a fixed title, image, description or url as those should vary depending on the page (post) the viewer is linking to.

    Plugin Author micropat

    (@micropat)

    Yep, it would involve custom coding work to make the values dynamic in your theme. Generally it’s best to find a “meta tags” plugin to handle this for you on each page. The Yoast and All in One “SEO” plugins are very popular for this, and there are probably some good lighter-weight “meta tags” plugins out there as well.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.