2014-02-19 14 views
0

我已將我的Facebook應用程序添加到頁面,但訪問它時向我顯示帶有悲傷表情圖標的空白頁面。 任何想法是什麼造成這種情況? 我粘貼在我正在使用的索引和配置文件下面。facebook標籤頁應用程序不工作

從我的鏈接索引文件是:

<?php 
    include("config.php"); 
?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> 
<head> 
<link rel="stylesheet" type="text/css" href="style.css" /> 
<style type="text/css"> 
body { 
width:520px; 
margin:0; padding:0; border:0; 
} 
</style> 
<meta http-equiv="Content-Type" content="text/html; 
charset=iso-8859-1" /> 
</head> 
<body> 
<div id="container"> 
<p>Pagina de dulciuri a lui Alexis</p> 
<a href="formular.php">Du-te la formular</a> 
</div> 
</body> 
</html> 

的config.php文件:

<?php 

require './src/facebook.php'; 
$fbPermissions = 'publish_stream,manage_pages,photo_upload'; 

$config = array(
     'appId' => 'ID', 
     'secret' => 'secret', 
     'fileUpload' => true, // optional 
     'allowSignedRequest' => true, // optional, but should be set to false for non-canvas apps 
     'cookie' => true, 
); 

$facebook = new Facebook($config); 

$session = $facebook->getUser(); 
if ($session) { 

    } else { 
    echo "Please login and come back!"; 
    } 


?> 

感謝enter image description here

回答

1

我猜你已經在你的FB帳戶的安全設置中啓用安全瀏覽。因此,FB會嘗試通過HTTPS請求您的應用程序。確保您的服務器能夠處理HTTPS連接。

+0

謝謝Tobi,就是這樣。 SSL未啓用,並且facebook選項卡的應用只能在HTTPS上使用。 –

相關問題