2016-04-07 81 views
1

我有一个拥有Facebook分享按钮的sharepoint网页。
然而,当我分享网页后,图片未显示在脸书上。facebook share图片未显示

使用Facebook工具“Open Graph的对象调试”,我得到了以下错误

Errors That Must Be Fixed Missing Required Property The 'og:type' property is required, but not present.

当查看网页的源代码,我可以清楚地看到,需要Facebook的元数据是有
<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" />

任何人有什么想法?

回答

1

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

如果Facebook从你的服务器的原因将一无所获是:

  • web服务器的错误的配置
  • 防火墙阻止Facebook的刮板的IPS
  • 重定向问题

此外,检查状态如果代码中的代码不是200或206,则在调试器中提供,但问题肯定不在Open Graph本身中。

在情况下,它是SSL的问题,您正在使用Letsencrypt此SSL PARAMS再次为我的网站看到Facebook的:

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

0

我有这个问题。我的解决方案是打电话给我的托管服务提供商(我的情况是Godaddy),并告诉他们重新启动我的网站上的PHP进程。

该问题与高速缓存有关。您的服务器可能会提供旧内容以节省时间。

然后我访问了https://developers.facebook.com/tools/debug/并点击了“scrape again”按钮。