Alexis Cimpu
Alexis Cimpu

Reputation: 321

facebook Tab Page app not working

I have added my facebook app to a page but when accessing it shows me a blank page with a sad emoticon. Any idea what is causing this ? I have pasted below the index and config file that i am using.

The index file from my link is:

<?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>

the 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!";
    }


?>

Thanksenter image description here

Upvotes: 0

Views: 142

Answers (1)

Tobi
Tobi

Reputation: 31479

I guess you have enabled secure browsing in you FB account's security settings. Therefore, FB tries to request your application via HTTPS. Make sure your server is capable of handling HTTPS connections.

Upvotes: 1

Related Questions