简体   繁体   English

iOS10消息链接预览图像

[英]iOS10 Messages Link Preview Image

Any iOS10 beta testers out there know if Messages uses a syntax similar to Facebook Open Graph to set things like meta descriptions and images? 任何iOS10 beta测试人员都知道,如果Messages使用类似于Facebook Open Graph的语法来设置元描述和图像等内容吗?

I'm building a site and would like to have it ready for when iOS10 is launched. 我正在建立一个网站,并希望在iOS10推出时做好准备。

Here's the type of stuff I'm talking about: 这是我正在谈论的东西的类型:

<!-- Facebook Meta -->
<meta property="og:title" content="Site | Title of Page" />
<meta property="og:image" content="http://www.domain.com/im-content/social-post-images/facebook image.png" />
<meta property="og:url" content="http://www.domain.com" />
<meta property="og:site-name" content="Site | Title of Page"/>
<meta property="og:type" content="website" />
<meta property="og:description" content="Here is a description of my site that will show up in the Facebook card." />

And here's the image/info I'm trying to control: 这是我试图控制的图像/信息:

在此输入图像描述

It's at least using Open Graph and Twitter Card . 它至少使用Open GraphTwitter Card

Demos 演示

Open Graph 打开图表

Markup: 标记:

<meta property="og:image" content="https://www.j-26.com/assets/facebook.jpg"/>

Preview: 预习:

在此输入图像描述


Twitter Card Twitter卡

Markup: 标记:

<meta name="twitter:image" content="https://www.j-26.com/assets/twitter.jpg"/>

在此输入图像描述


Notable findings 值得注意的发现

I tested this page using Twitter Card and Open graph and iOS seemed to prefer Open Graph. 我使用Twitter Card和Open graph测试了这个页面 ,iOS似乎更喜欢Open Graph。 On the test page, the Twitter Card markup is placed before the Open Graph markup and the image used for Twitter Card is smaller than the one used in Open Graph. 在测试页面,Twitter的卡片标记被放置在打开图标记之前,并用于Twitter的卡上的图像比在打开图中使用的一个 Despite the smaller size and earlier placement, iOS chose to display the image from Open Graph. 尽管尺寸较小且放置较早,但iOS选择从Open Graph中显示图像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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