vctlzac
vctlzac

Reputation: 847

How to configure Site URL and Canvas URL

I'm trying to configure my application in facebook but I have a trouble.

My application works through a servlet (http://www.mysite.com:port/myproject/servlet). In the settings of the application I'm setting:

Site URL: http://mysite:port/myproject/servlet?

Canvas URL: http://mysite:port/myproject/servlet?

This configuration works properly except for one detail. If I access it by its URL "http://apps.facebook.com/myapp" or on my home page (column applications on the left side of the page the user) works correctly. But if new user accesses the application, after clicking the "allow" in permission dialog (https://developers.facebook.com/docs/beta/authentication), the application is redirected to a URL outside of facebook (http://mysite:port/myproject/servlet?) When it should be redirected to http://apps.facebook.com/myapp.

What is the correct configuration?

Thanks.

Upvotes: 1

Views: 3005

Answers (1)

Michael Vain
Michael Vain

Reputation: 486

By which URL does the user get to the Auth dialog?

In the first place he should be redirected to:

https://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&scope=email,read_stream

and YOUR_URL should be http://apps.facebook.com/myapp or anything else you want it to be.

Upvotes: 1

Related Questions