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
_ ________________
美術插畫設計案子報價系統 v0.1 Beta
爪哇禾雀
|