title: trying to customize the facebook share button
body: <p>Is there a way! when click on facebook share button from post the image should be top of post title and description instead of left to on facebook share window.</p>
  
  <p>i have tried this code as a Wordpress plugin</p>
  
  <pre><code>add_image_size('fb-preview', 190, 190, true);
  // get image preview
  function ST4_get_FB_image($post_ID){
      $post_thumbnail_id = get_post_thumbnail_id( $post_ID );
      if ($post_thumbnail_id){
          $post_thumbnail_img = wp_get_attachment_image_src( $post_thumbnail_id, 'fb-preview');
          return $post_thumbnail_img[0];
      }
  }
  // get post description
  function ST4_get_FB_description($post){
      if ($post-&gt;post_excerpt){
          return $post-&gt;post_excerpt;
      } else {
          // post excerpt is not set, we'll take first 55 words from post content
          $excerpt_length = 55;
          // clean post content
          $text = str_replace("\r\n"," ", strip_tags(strip_shortcodes($post-&gt;post_content)));
          $words = explode(' ', $text, $excerpt_length + 1);
          if (count($words) &gt; $excerpt_length) {
              array_pop($words);
              $excerpt = implode(' ', $words);
              return $excerpt;
          }
      }
  }
  
  function ST4FB_header(){
      global $post;
      $post_featured_image = ST4_get_FB_image($post-&gt;ID);
      $post_description = ST4_get_FB_description($post);
  
      if ( (is_single()) AND ($post_featured_image) AND ($post_description) ){ 
  ?&gt;  
      &lt;link rel="image_src" href="&lt;?php echo $post_featured_image; ?&gt;" /&gt;
      &lt;meta name="title" content="&lt;?php echo $post-&gt;post_title; ?&gt;" /&gt;
      &lt;meta name="description" content="&lt;?php echo $post_description; ?&gt;" /&gt;
  
  &lt;?php
      }
  }
  add_action('wp_head','ST4FB_header');
  </code></pre>
  
  <p>and facebook share button on post page.</p>
  
  <p>ID)); ?>&amp;t=post_title); ?>">Share on Facebook<img src="https://i.stack.imgur.com/77cVO.gif" alt="enter image description here"></p>