2014-11-05 26 views
0

我與一個WordPress的網站和Facebook分享問題。我的網站沒有任何分享按鈕,我說的分享是當任何用戶在Facebook上粘貼網址時,出現的圖像是一些隨機圖像,而不是我想要顯示的圖標。Facebook的WordPress的網站與錯誤的形象共享

我試過到目前爲止:

<meta property="og:url" content="http://example.com"> 
<meta property="og:title" content="example name"> 
<meta property="og:site_name" content="example name"> 
<meta property="og:image" content="http://example.com/wp-content/uploads/2014/03/logo_example.png"> 
<meta property="og:image:type" content="image/png"> 
<meta property="og:image:width" content="105"> 
<meta property="og:image:height" content="72"> 
<link rel="image_src" type="image/png" href="http://example.com/wp-content/uploads/2014/03/logo_example.png" /> 

此代碼是一個例子,鏈接,圖片不能正常工作。

+0

您是否看過WordPress插件,可以將所有這些打開的圖形數據自動添加到每個頁面上?我以前使用https://wordpress.org/plugins/wp-open-graph/取得了很大的成功。 Open Graph也被LinkedIn和其他一些網站使用。該插件允許您爲每個帖子/頁面或站點範圍內的默認設置指定圖片和文本 – 2014-11-05 20:18:46

回答

0

我的解決辦法:

在這個網站:https://developers.facebook.com/tools/debug/og/object/我可以調試Facebook的元標記,發現我的形象必須是至少200×200像素。因爲它不是,Facebook總是有其他圖像來建立分享。所以,我不得不改變我的形象,並刪除了寬度和高度元標籤。