timkl
timkl

Reputation: 3339

Canvas URL / Secure Canvas URL error message

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.

Upvotes: 5

Views: 40856

Answers (6)

Ramdhas
Ramdhas

Reputation: 1765

Just fill these items in facebook developers page,

  • Canvas URL
  • Secure Canvas URL

Upvotes: 0

Vladyn
Vladyn

Reputation: 583

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."

Upvotes: 0

disco
disco

Reputation: 1506

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

Upvotes: 12

Floyd Wilburn
Floyd Wilburn

Reputation: 1842

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).

Upvotes: 1

medampudi
medampudi

Reputation: 399

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.

Upvotes: 1

Igy
Igy

Reputation: 43816

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

Upvotes: 8

Related Questions