代码之家  ›  专栏  ›  技术社区  ›  Alexis Cimpu

facebook标签页应用程序不工作

  •  0
  • Alexis Cimpu  · 技术社区  · 12 年前

    我已经将我的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 回复  |  直到 12 年前
        1
  •  1
  •   Tobi    12 年前

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