Facebook首先打开图形无图像 [英] Facebook Open Graph No Image First Time
问题描述
我正在尝试使用链接配置共享/发送按钮。我已经在页面上正确配置了打开的图形图像标签,但是当第一次打开共享/发送对话框时,图像不会显示。没有刷新页面,第二次打开共享/发送对话框,图像将显示。页面的URL和图像都是HTTP(而不是HTTPS)。
I'm trying to configure a share/send button with a link. I've properly configured the open graph image tags on a page, but when opening the share/send dialog for the first time, the image doesn't show. Without refreshing the page, opening the share/send dialog for the second time, the image will show. The URL of the page and the images are all in HTTP (instead of HTTPS).
我不能简单地使用URL-Linting工具,因为页面将具有唯一网址。该网站是关于向人们发送虚拟花朵,所以要共享的页面是新鲜生成的。
I can't simply use the URL-Linting tool as the page will have a unique URL. The website is about sending virtual flowers to people and so the page to be shared is freshly generated.
真的很感激一些帮助:)
Would really appreciate some help :)
推荐答案
发现问题。不幸的是,如果您没有正确设置打开的图形标签,则会出现此问题。
Found the problem. Somehow this problem happens if you don't set your open graph tags properly.
不正确:
<meta property="og:image" content="http://asdfg.com/<%= videoId %>/image" />
正确:
<meta property="og:image" content="http://asdfg.com/<%= videoId %>/image" />
<meta property="og:image:secure_url" content="https://asdfg.com/<%= videoId %>/image" />
<meta property="og:image:width" content="640" />
<meta property="og:image:height" content="442" />
这篇关于Facebook首先打开图形无图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!