我在我的Facebook頁面上使用以下代碼來檢查用戶是否是FAN或非FAN。在此之後,用戶獲得不同的內容。它工作正常,但如果我在Facebook中使用安全瀏覽功能,我總是會看到:「你不喜歡這個頁面。」.htacess在我的Facebook上重定向和安全瀏覽頁面
<?php
require_once 'facebook-php-sdk/src/facebook.php';
// Create our Application instance.
$facebook = new Facebook(array(
'appId' => 'X',
'secret' => 'X',
'cookie' => true,
));
$signed_request = $facebook->getSignedRequest();
$like_status = $signed_request["page"]["liked"];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>zukundo</title>
<link rel="stylesheet" href="css/blueprint/screen.css" type="text/css" media="screen, projection">
</head>
<body>
<?php
if ($like_status) {
echo "You like this page.";
} else {
echo "You like this page not yet.";
}
?>
</body>
</html>
我發現這個問題:這是因爲這在我的.htaccess 你知道,如果沒有解決,而不刪除下面的代碼這個問題的一種方式,因爲這是很好的搜索引擎優化?
RewriteCond %{HTTP_HOST} ^page\.de
RewriteRule (.*) http://www.page.de/$1 [R=301,L]
[安全瀏覽不會在Facebook頁面上爲粉絲/非粉絲顯示不同內容](http://facebook.stackoverflow.com/questions/7609149/secure-browsing-dont-show-different -content-for-fans-non-fans-on-a-facebook-page) – bkaid