facebook分享图片没有显示 [英] facebook share Image not showing

查看:2082
本文介绍了facebook分享图片没有显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个拥有facebook分享按钮的sharepoint网页。

但是在我分享网页后,图片没有显示在Facebook上。

I have a sharepoint webpage that has a facebook share button.
however after I shared the webpage, the image is not showing in facebook.

使用facebook工具'Open Graph Object Debugger',我收到以下错误

Using the facebook tool 'Open Graph Object Debugger', I got the following error

必须修正的错误
缺少必需的属性'og:type'属性是必需的,但不存在。

查看网页的来源时,我可以清楚地看到所需的facebook元数据在那里

< meta property =og:urlcontent =https%3a% 2f%2fxxx.xx.xx / xx/>
< meta property =og:typecontent =website/>
< meta property =og:titlecontent =xxx/>
< meta property =og:descriptioncontent =/>
< meta property =og:imagecontent =https://xxx.xx.xx/xxx.jpg/>

When Viewing the source of the webpage, I can clearly see that the required facebook meta data is there
<meta property="og:url" content="https%3a%2f%2fxxx.xx.xx/xx" /> <meta property="og:type" content="website" /> <meta property="og:title" content="xxx" /> <meta property="og:description" content="" /> <meta property="og:image" content="https://xxx.xx.xx/xxx.jpg" />

任何人有任何想法吗?

推荐答案

检查Facebook Crawler是否获取了您的页面。底部有一个链接,可以查看Facebook刮刀从您的网站获取的内容。如果它是空的,很可能您的Web服务器响应不同或根本不响应Facebook。我有一个类似的问题。在我的情况下,刮刀通过HTTP获取页面,并通过HTTPS(SSL)获取任何内容,尽管可信证书。

Check if Facebook Crawler gets your page at all. There is a link at the bottom that allows seeing what Facebook scraper gets from your site. If it's empty, most probably your web server responds differently or doesn't respond at all to Facebook. I have a similar issue. In my case scraper gets the page over HTTP and gets nothing over HTTPS (SSL) despite trusted certificate.

如果facebook没有从您获得任何服务器,原因是:

If facebook gets nothing from you server reasons are:


  • 网络服务器的错误配置

  • 防火墙阻止facebook刮刀的IP

  • 重定向问题

此外,检查facebook在调试器中提供的状态代码,如果它不是200或206,问题肯定不在打开图表本身。

Also, check status code facebook provides in Debugger if it's not 200 or 206, the problem is definitely not in an Open Graph itself.

如果是SSL问题并且你正在使用Letsencrypt这个SSL params让我的网站再次显示给Facebook:

In case it's SSL issue and you're using Letsencrypt this SSL params made my site visible to Facebook again:

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
ssl_ecdh_curve secp384r1;
ssl_session_cache shared:SSL:10m;
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.8.8 8.8.4.4 valid=300s;
resolver_timeout 5s;
# Disable preloading HSTS for now.  You can use the commented out header line that includes
# the "preload" directive if you understand the implications.
#add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;

更多细节可在此处找到: https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html

More details might be found here: https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html

这篇关于facebook分享图片没有显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆