5

I'm currently trying to get a Facebook App up and running.

But I get the following error-message, when I try to access the app URL:

Sorry, the application you were using is misconfigured. Please try again later. Message for Developers Only: To fix this error, please set your Canvas URL / Secure Canvas URL in the application settings editor. Once it has been set, your users will be redirected to that URL instead of this error page.

This is how my URLs is set up:

I've tested all URLs and they're perfectly fine, https works.

My index.php only has the following content:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <title>Facebook test</title>

</head>

<body>

<h1>Works!</h1>

</body>

Do I need to link to some files from the Facebook SDK to test my app? Facebook app dev is uncharted territory to me, so any hints on how to go about this is highly appreciated.

timkl
  • 3,299
  • 12
  • 57
  • 71
  • Do you mean literally one line? If it only has that they that could be the cause of the problem. You should try having a proper page there with a doctype, head and body etc. Do you have live links to the pages you are using? – Abby Nov 07 '11 at 09:54
  • This is the page I'm using: http://www.cbb.dk/files/design/facebook/index.php – timkl Nov 17 '11 at 07:44

6 Answers6

12

I have tried to configure your application, and had no problem to get it running. You can try it out here: https://apps.facebook.com/cbb-example/.

As Igy explained in his answer, you need to set the "Secure Canvas Url" not the "Secure Page Tab url". See attached image.

Configuration of example app

disco
  • 1,496
  • 12
  • 23
8

The three parameters you mentioned are the page tab URL, the secure page tab URL and the page tab edit URL, these are used in the context of your app being installed as a tab on a Facebook Page.

The error message you're seeing is regarding your Canvas URL and secure Canvas URL, which is the content loaded when you access 'http://apps.facebook.com/yourapp' - if you're not building a canvas app you shouldn't need those, but neither will the apps.facebook URL work

Igy
  • 43,710
  • 8
  • 89
  • 115
  • @Igy Can you please tell me where to find Canvas URL, if it still exists? I can find Secure Canvas URL and Canvas Page, but am I incapable of finding Canvas URL within my App's settings, or is it just deprecated? – Ognjen Babic Mar 09 '16 at 07:15
  • It no longer exists, users can only access Facebook over HTTPS now, there's no HTTP access, so apps must be accessible via HTTPS and there's no HTTP-only field – Igy Mar 10 '16 at 19:53
1

if the applicaiton doesnot have a reference to the facebook app user name the secret key... then you mostly willl get this error.,

for the basic steps have a look at how to setup facebook by this. simple website.

 <html>
    <head>
      <title>My Facebook Login Page</title>
    </head>
    <body>
      <div id="fb-root"></div>
      <script>
        window.fbAsyncInit = function() {
          FB.init({
            appId      : 'YOUR_APP_ID',
            status     : true, 
            cookie     : true,
            xfbml      : true
          });
        };
        (function(d){
           var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
           js = d.createElement('script'); js.id = id; js.async = true;
           js.src = "//connect.facebook.net/en_US/all.js";
           d.getElementsByTagName('head')[0].appendChild(js);
         }(document));
      </script>
      <div class="fb-login-button" data-perms="email,user_checkins">
        Login with Facebook
      </div>
    </body>
 </html> 

have a look at this file for a more PHP specific example

called the example.php file.. that uses the app ID and app secret to recognize whether the app has already got credentials from the user. so change the app ID and app secret to get the required information pertaining to your applicaiton.please do let me know if its worked out good.

medampudi
  • 399
  • 3
  • 15
  • Thx for helping me out! :) I've changed the content of my index.php file to reflect example.php. I've edited the path to facebook.php, and changed the app ID + secret. However I get a "Server error"? – timkl Nov 17 '11 at 08:22
  • the same or something different – medampudi Nov 17 '11 at 08:28
  • The original error you were getting does not have to do with the content of your index.php file. The one you had was fine for testing purposes. – Floyd Wilburn Nov 17 '11 at 09:04
  • @FloydWilburn OK - I've changed it back to the bland HTML-page from my initial post. But I still get the Canvas URL / Secure Canvas URL error? HTTPS works fine: https://www.cbb.dk/files/design/facebook/ What could be wrong? :) – timkl Nov 17 '11 at 09:50
  • as floyd wilburn says.. i think yo need to put it he says... with the example.html (php sytle ) or the a index.html(check this out first) with the code i gave above(reference Facebook developer documentation )... – medampudi Nov 17 '11 at 10:40
1

Your URL settings should not point to a particular file, but to a base url that will be used as a prefix. I.e. they should be set to something like http://www.somesite.dk/facebook/ and your server should be set to automatically use index.php as the default page (which is very likely already the case).

Floyd Wilburn
  • 1,852
  • 2
  • 13
  • 6
0

SSL is a must here - I you have be able to view your app hosted via HTTPS. I'm getting same error, for one of mine apps, but for other (not created by me) I don't have description message - just an Error with text "Sorry, the application you were using is misconfigured. Please try again later."

Vladyn
  • 437
  • 1
  • 5
  • 14
0

Just fill these items in facebook developers page,

  • Canvas URL
  • Secure Canvas URL
Ramdhas
  • 1,765
  • 1
  • 18
  • 26