2013-02-14 98 views
0
公佈錯誤的元數據

問題:當有人從我的博客使用分享按鈕,它發佈的頁面上這樣說:分享按鈕:當FB

[共享者的名稱]的西雅圖共享通過鏈接[錯誤名稱]。

「via」後面的名字是六個月前在博客上曾經是開發者的名字。在我的博客的任何地方,或任何我能找到的代碼中,任何地方都沒有他的名字。

什麼值決定顯示在那裏的名字?推薦人?描述?我無法找到答案或編輯它們的地方。

已經在我的WordPress博客上通過插件Social Sharing Toolkit(http://www.active-bits.nl/support/social-sharing-toolkit/)使用了Facebook Share按鈕一個多星期。

下面是插件的代碼(注意:它包括「贊」選項和「關注」按鈕):

<?php 
class MR_Social_Sharing_Toolkit_Facebook extends MR_Social_Sharing_Toolkit_Button { 
function __construct() { 
    $this->share_buttons[] = array('name' => 'fb_like', 'title' => 'Facebook Like', 'types' => array('none', 'none_text', 'horizontal', 'vertical')); 
    $this->share_buttons[] = array('name' => 'fb_share', 'title' => 'Facebook Share', 'types' => array('none', 'horizontal', 'vertical', 'icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large')); 
    $this->share_buttons[] = array('name' => 'fb_send', 'title' => 'Facebook Send', 'types' => array('none')); 
    $this->follow_buttons[] = array('name' => 'follow_facebook', 'title' => 'Facebook', 'id' => 'id:', 'types' => array('icon_small', 'icon_small_text', 'icon_medium', 'icon_medium_text', 'icon_large')); 
    $this->title = 'Facebook'; 
    $this->icon = 'facebook'; 
} 

function fb_like($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') { 
    //$retval = '<iframe src="https://www.facebook.com/plugins/like.php?locale='.__('en_US','mr_social_sharing_toolkit').'&amp;href='.urlencode($url).'&amp;layout='; 
    $retval = '<div class="fb-like" data-href="'.$url.'" data-send="false" '; 
    switch ($type) { 
     case 'horizontal': 
      //$retval .= 'button_count'; 
      if ($id == 'recommend') { 
       $width = __('fb_horizontal_recommend_width','mr_social_sharing_toolkit'); 
       $width = ($width == 'fb_horizontal_recommend_width') ? '120' : $width; 
       $retval .= 'data-layout="button_count" data-width="'.$width.'" data-action="recommend"';      
      } else { 
       $width = __('fb_horizontal_width','mr_social_sharing_toolkit'); 
       $width = ($width == 'fb_horizontal_width') ? '90' : $width; 
       $retval .= 'data-layout="button_count" data-width="'.$width.'"';      
      } 
      $height = '21';    
      break; 
     case 'vertical': 
      //$retval .= 'box_count'; 
      if ($id == 'recommend') { 
       $width = __('fb_vertical_recommend_width','mr_social_sharing_toolkit'); 
       $width = ($width == 'fb_vertical_recommend_width') ? '92' : $width; 
       $retval .= 'data-layout="box_count" data-width="'.$width.'" data-action="recommend"';     
      } else { 
       $width = __('fb_vertical_width','mr_social_sharing_toolkit'); 
       $width = ($width == 'fb_vertical_width') ? '55' : $width; 
       $retval .= 'data-layout="box_count" data-width="'.$width.'"';     
      } 
      $height = '62'; 
      break; 
     case 'none_text': 
      //$retval .= 'standard'; 
      if ($id == 'recommend') { 
       $width = 'auto'; 
       $retval .= 'data-width="'.$width.'" data-action="recommend"';     
      } else { 
       $width = 'auto'; 
       $retval .= 'data-width="'.$width.'"';     
      } 
      $height = '25'; 
      break; 
     default: 
      //$retval .= 'standard'; 
      if ($id == 'recommend') { 
       $width = __('fb_standard_recommend_width','mr_social_sharing_toolkit'); 
       $width = ($width == 'fb_standard_standard_recommend_width') ? '91' : $width; 
       $retval .= 'data-width="'.$width.'" data-action="recommend"';     
      } else { 
       $width = __('fb_standard_width','mr_social_sharing_toolkit'); 
       $width = ($width == 'fb_standard_width') ? '51' : $width; 
       $retval .= 'data-width="'.$width.'"';     
      } 
      $height = '24'; 
      break; 
    } 
    //$retval .= '&amp;show_faces=false&amp;width='.$width.'&amp;height='.$height.'" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:'.$width.'px; height:'.$height.'px;" allowTransparency="true"></iframe>';*/ 
    $retval .= ' data-show-faces="false"></div>'; 
    $lang = __('en_US','mr_social_sharing_toolkit'); 
    $footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false; 
    $this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__), $footer); 
    $this->enqueue_script('Social_sharing_facebook_xfbml', 'http://connect.facebook.net/'.$lang.'/all.js#xfbml=1', $footer); 
    return '<span style="display: inline-block; width: '.$width.'px; height: '.$height.'px; overflow: hidden;">'.$retval.'</span>'; 
} 

function fb_share($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') { 
    switch ($type) { 
     case 'vertical': 
      $retval = '<fb:share-button type="box_count" href="'.$url.'"></fb:share-button>'; 
      //$retval = '<a name="fb_share" type="box_count" share_url="'.$url.'" href="http://www.facebook.com/sharer.php">Share</a>'; 
      $this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__)); 
      $footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false; 
      $this->enqueue_script('Social_sharing_facebook_xfbml', 'http://connect.facebook.net/en_US/all.js#xfbml=1', $footer); 
      //$this->enqueue_script('Social_sharing_facebook_share', 'http://static.ak.fbcdn.net/connect.php/js/FB.Share', $footer); 
      break; 
     case 'horizontal': 
      $retval = '<fb:share-button type="button_count" href="'.$url.'"></fb:share-button>'; 
      //$retval = '<a name="fb_share" type="button_count" share_url="'.$url.'" href="http://www.facebook.com/sharer.php">Share</a>'; 
      $this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__)); 
      $footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false; 
      $this->enqueue_script('Social_sharing_facebook_xfbml', 'http://connect.facebook.net/en_US/all.js#xfbml=1', $footer); 
      //$this->enqueue_script('Social_sharing_facebook_share', 'http://static.ak.fbcdn.net/connect.php/js/FB.Share', $footer); 
      break; 
     case 'none': 
      $retval = '<fb:share-button type="button" href="'.$url.'"></fb:share-button>'; 
      //$retval = '<a name="fb_share" type="button" share_url="'.$url.'" href="http://www.facebook.com/sharer.php">Share</a>'; 
      $this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__)); 
      $footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false; 
      $this->enqueue_script('Social_sharing_facebook_xfbml', 'http://connect.facebook.net/en_US/all.js#xfbml=1', $footer); 
      //$this->enqueue_script('Social_sharing_facebook_share', 'http://static.ak.fbcdn.net/connect.php/js/FB.Share', $footer); 
      break; 
     default: 
      $url = 'https://www.facebook.com/sharer/sharer.php?u='.urlencode($url).'&amp;t='.urlencode($title); 
      $text = ($text == '') ? __('Share on','mr_social_sharing_toolkit').' Facebook' : $text; 
      $retval = $this->get_icon($type, $url, $text, $icon, true); 
      break; 
    } 
    return $retval; 
} 

function fb_send($url, $title, $type, $id, $media = '', $description = '', $text = '', $icon = '') { 
    //$retval = '<div id="fb-root"></div><fb:send href="'.$url.'" font=""></fb:send>'; 
    $retval = '<div class="fb-send" data-href="'.$url.'"></div>'; 
    $lang = __('en_US','mr_social_sharing_toolkit'); 
    $this->enqueue_script('Social_sharing_facebook_root', plugins_url('/button.facebook.js', __FILE__)); 
    $footer = (get_option('mr_social_sharing_js_footer') == 1) ? true : false; 
    $this->enqueue_script('Social_sharing_facebook_xfbml', 'http://connect.facebook.net/'.$lang.'/all.js#xfbml=1', $footer); 
    return $retval;   
} 

function follow_facebook($type, $id, $text = '', $icon = '') { 
    $url = 'http://www.facebook.com/'.$id; 
    $text = ($text == '') ? __('Friend me on','mr_social_sharing_toolkit').' Facebook' : $text; 
    $blank = (get_option('mr_social_sharing_follow_new') == 1) ? true : false; 
    return $this->get_icon($type, $url, $text, $icon, false, $blank); 
} 

} >

回答

0

尋找他的用戶部分和看看他的特權是什麼。我會刪除他的賬戶,然後把你的網址放在Facebook調試器中重新設置你的網站。看看會發生什麼。

+0

是的,我昨天刪除了他的帳戶。它需要時間才能顯示出來? – user2049547 2013-02-15 05:38:19

+0

這就是我從調試器得到的結果: 推斷的屬性:\t即使可以從其他標記中推斷出值,也應明確提供'og:url'屬性。 推斷的屬性:\t即使可以從其他標籤推斷出值,也應明確提供'og:title'屬性。 推斷的屬性:\t即使可以從其他標籤推斷出值,也應明確提供'og:description'屬性。 推斷的屬性:\t即使可以從其他標籤推斷出值,也應明確提供'og:image'屬性。 – user2049547 2013-02-15 05:39:09

+0

我該如何提供那些......? – user2049547 2013-02-15 05:49:44