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
375 views
in Technique[技术] by (71.8m points)

meta tags - How to set priority order to Open Graph images for links that are inserted in comments. (Not sharing or wall posts.)

When pasting a link to a page within a comment, not directly as a wall post, Facebook defaults to choosing a thumbnail image, without users being able to choose the relevant thumbnail. Is it possible to set or determine priority for og:image tags on pages with multiple og:image tags? There doesn't seem to be any logical way to determine why FB is choosing any specific image. The image they are choosing isn't the first, or last image, by code order or alphabetized by name, and doesn't really follow any reasonable reason that I can figure out. Does anyone know how to set which image is chosen on comments?

I already know how to do this for wall posts, status updates, and sharing links, but you do not have the thumbnail chooser when posting links within comments, so being able to prioritize the order of multiple images would be ideal.

See Question&Answers more detail:os

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

1 Reply

0 votes
by (71.8m points)

I have just found out that Facebook will try to display best images (higher resolution) first. For example, if I have 3 meta tags in following order:

<meta content='http://mysite/low-res.jpg' property='og:image'>
<meta content='http://mysite/med-res.jpg' property='og:image'>
<meta content='http://mysite/hi-res.jpg'  property='og:image'>

then the order of displaying on Facebook dialog will be:

hi-res.jpg
med-res.jpg
low-res.jpg

I hope it will help.


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

...