2016-04-07 83 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」按鈕。