Custom Facebook share button with custom title,url,image in wordpress

After here and there for long i find the solution for above :

Replaced above meta tag with below

<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>

<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );  ?>

<?php if($image[0] != "" ){ ?>

<meta property="og:image" content="<?php echo $image[0]; ?>"  >

<?php } else { ?>

<meta property="og:image" content="logo.png"  >

<?php } ?>


<meta property="og:image:width" content="3523" >

<meta property="og:image:height" content="2372" >

<meta property="og:url" content="<?php echo the_permalink(); ?>"  >

<meta property="og:title" content="<?php echo the_title(); ?>"  > 

<meta property="og:site_name" content="Thefansworld" />

<meta property="og:description" content="" >  

<meta property="fb:app_id" content="3668661019" >

<meta property="fb:admins" content="" >

 <?php endwhile; wp_reset_query(); ?>

But still some of the POST give me wrong images and after some research i found :

When pulling a webpage from an URL, Facebook caches it’s content for later. It means, that if Facebook once pulls data from your site, and than your site changes (for example your og:image tags change), Facebook will not change the image, because it already has everything cached on its side.

Try visiting Facebook Debugger page and review what Facebook “sees”. Using this tool forces Facebook to refresh data from the given URL. This is the best way to debug it.

When you make sure Facebook “sees” proper og:image tags, then make sure the images in the og:image are of proper minimum width/height (it’s all explained in the fb debugger).

Facebook will not use an image from og:image if it does not meet FB’s criteria. I strongly recommend this tool whenever there are any issues with content from your site on FB.

Hope this will help some one.And if i am wrong some where please let me know 🙂