1) Put this code before </head> and pass image url in header file
<meta property="og:image" content="<?php echo $image_urls; ?>" />
2) Give facebook share link on Page
<a title="facebook" href="http://www.facebook.com/sharer.php?s=100&p[title]=<?php echo $alb['title']; ?>&p[summary]=<?php echo $description;?>&p[url]=<?php echo urlencode($share_url);?>&
p[images][0]=<?php //echo $image_urls;?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=no,scrollbars=no,height=400,width=600'); return false;"><i class="fa fa-facebook" aria-hidden="true"></i></a>
3) Finally go to Facebook Debug tool to check sharing URL
https://developers.facebook.com/tools/debug/sharing/
Paste sharing URL and click on Debug button. That's it.
<meta property="og:image" content="<?php echo $image_urls; ?>" />
2) Give facebook share link on Page
<a title="facebook" href="http://www.facebook.com/sharer.php?s=100&p[title]=<?php echo $alb['title']; ?>&p[summary]=<?php echo $description;?>&p[url]=<?php echo urlencode($share_url);?>&
p[images][0]=<?php //echo $image_urls;?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=no,scrollbars=no,height=400,width=600'); return false;"><i class="fa fa-facebook" aria-hidden="true"></i></a>
3) Finally go to Facebook Debug tool to check sharing URL
https://developers.facebook.com/tools/debug/sharing/
Paste sharing URL and click on Debug button. That's it.
No comments:
Post a Comment