首頁 繪圖設計 工作閒聊 比賽活動 美術討論 標籤 圖片
"?fb_xd_fragment=" Like Button 相關問題
Type(Type) 2011/8/2 22:29

Facebook Like Button "fb_xd_fragment" Bug



受影響的有: Firefox 5.0+ + Safari + More Browsers...
根據 Facebook 的 Bugzilla 顯示,
直接 WONTFIX 代表他們根本不想修復這個問題。

http://bugs.developers.facebook.net/show_bug.cgi?id=9777
Status: CLOSED WONTFIX <-- Why?

引言回覆:

------- Comment #69 From Jason 2011-06-14 14:23:40 PDT -------

Unfortunately there will not be a fix for this in the near term. Please work
around it if possible.









Possible Workaround #1: Replace URI in your Script


代碼:

/* At your head of script, try to filter the parameter away and redirect again */
if (isset($HTTP_GET_VARS['fb_xd_fragment']))
{
   header('Location: http://'.$_SERVER['HTTP_HOST'].str_replace('?fb_xd_fragment=', '', $_SERVER['REQUEST_URI']), true);
   exit;
}





Possible Workaround #2: Don't Display Like Button if detected


代碼:

/* Like previous one, try NOT to add FB Like Button if fb_xd_fragment detected */
if (isset($HTTP_GET_VARS['fb_xd_fragment']))
{
    $fb_button_fbxml = "<!-- workaround fb _xd_fragment bug //-->';
}


Possible Workaround #3: Using Redirect / ReWrite in Server Conf


Using Redirect, Rewrite or RedirectMatch or something similar

http://httpd.apache.org/docs/2.0/mod/mod_alias.html
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
http://httpd.apache.org/docs/2.2/mod/mod_alias.html
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html
http://httpd.apache.org/docs/2.3/mod/mod_alias.html
http://httpd.apache.org/docs/2.3/mod/mod_rewrite.html



_


(2,400 views)
[更多討論] 討論區 Windows, Linux, Perl, PHP, C/C++, Driver, Web 理論、應用、硬體、軟體




""?fb_xd_fragment=" Like Button 相關問題" 傳統頁面(電腦版)

首頁 繪圖設計 工作閒聊 比賽活動 美術討論 標籤 圖片
傳統桌面版 [ 登入/註冊 ]
© Vovo2000.com Mobile Version 小哈手機版 2018