Given URL is not allowed by the Application configuration Facebook Android
===

I'm developing a Facebook integrated Android app. I followed this [tutorial](http://developers.facebook.com/docs/mobile/android/build/#sso) to the dot. The problem is that I get the following error if the Facebook app is not installed on the device when logging in:

Given URL is not allowed by the Application configuration

I implemented Single Sign On as specified in the tutorial. If I run my app on a device with the Facebook app already installed, my app redirects to the Facebook app to sign in. That's fine. However, if the Facebook app is not installed, I get the error. Here's a snapshot:

![enter image description here][1]

which redirects to Web page not available on signing in:

![enter image description here][2]

Code:

    package com.example.test;

    import android.app.Activity;
    import android.content.Intent;
    import android.os.Bundle;
    import com.facebook.android.*;
    import com.facebook.android.Facebook.*;

    public class MainActivity extends Activity {

	   Facebook facebook = new Facebook("786512521496852");

	    @Override
	    public void onCreate(Bundle savedInstanceState) {
	        super.onCreate(savedInstanceState);
	        setContentView(R.layout.activity_main);

	        facebook.authorize(this, new DialogListener() {
	            @Override
	            public void onComplete(Bundle values) {}

	            @Override
	            public void onFacebookError(FacebookError error) {}

	            @Override
	            public void onError(DialogError e) {}

	            @Override
	            public void onCancel() {}
	        });
	    }

	    @Override
	    public void onActivityResult(int requestCode, int resultCode, Intent data) {
	        super.onActivityResult(requestCode, resultCode, data);

	        facebook.authorizeCallback(requestCode, resultCode, data);
	    }
	}


  [1]: http://i.stack.imgur.com/d784K.png
  [2]: http://i.stack.imgur.com/SxOBO.png

Edit: I've asked a similar question before, but with less details. It was unanswered. Sorry if I'm not supposed to ask again.