简体   繁体   中英

How do I change the facebook recommended text, link or thumbnail image?

When a user recommends my link (which has content, images, etc) it only displays the site name as the link with no text or images. How can I edit it so it does so?

My code is as follows;

<div id="fb-root"></div> 
<script src="http://connect.facebook.net/en_US/all.js#appID=1234567890&xfbml=1"></script> 

   FB.Event.subscribe('edge.create', function(response) {
        //replace the next line with calling your div
        alert('Shared!');
   });
 </script>
 <fb:like href="http://www.mysite.com/" send="false" width="450" show_faces="true" action="recommend" font=""></fb:like>

Add open graph meta tags to your page so it knows what to pull in. https://developers.facebook.com/docs/opengraph/

On http://www.mysite.com/ , add the og:image meta tag for an image and og:description to customize the text.

Docs: https://developers.facebook.com/docs/opengraph/

There's a linter tool that checks whether you did it right: http://developers.facebook.com/tools/debug

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM