Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
310 views
in Technique[技术] by (71.8m points)

thumbnails - How do I get Facebook to show my site's logo when I paste the link in a post/status/comment?

Facebook sometimes does this really neat thing where they show a thumbnail preview of a website you link to in a status update. It is usually the website's logo.

fb status

I'm wondering what the trick is to get this to work for my site, so if I were to share http://www.example.com, I would see my site's logo/favicon in that preview box. How would I do this?

question from:https://stackoverflow.com/questions/10864208/how-do-i-get-facebook-to-show-my-sites-logo-when-i-paste-the-link-in-a-post-sta

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Try your site in this facebook debugger tool.

http://developers.facebook.com/tools/debug

It will tell you what is missing.Eg. below in page head

<meta property="og:image" content="[url to image]" />
<meta property="og:title" content="[page name]" />
<meta property="og:description" content="[content description]" />

There are different ways depending on how your site is built. Eg. This Wordpress plugin creates a link for each image on the page so you can chose between your logo and any other post image on the page.

Update 2017: It is now recommended to register a Facebook App ID for your site otherwise the debugger will give you an error. More tags and info


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...