Facebook标签页应用程序无法正常工作

时间:2014-02-19 11:48:14

标签: php facebook facebook-apps

我已经将我的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 个答案:

答案 0 :(得分:1)

我猜您已经在FB帐户的安全设置中启用了安全浏览。因此,FB尝试通过HTTPS请求您的应用程序。确保您的服务器能够处理HTTPS连接。