views:

49

answers:

1

Hi I created a desktop application. I was wondering what I should put for my Canvas Callback URL. I tried to define it as local (http://localhost:8084) but it doesnt accept it.

I need it to get the session using http://www.facebook.com/login.php?api_key=YOUR_API_KEY&v=1.0

Thanks!

+1  A: 

Your canvas callback URL has to be an address that Facebook can actually fetch data from. That is not localhost, since as the name implies that is local to you.

Read the following: http://wiki.developers.facebook.com/index.php/Canvas_Callback_URL#How_It_Works

Your canvas page URL is http://apps.facebook.com/foobar/
Your canvas callback URL is http://www.foobar.com/yourapp/
[...etc]

Putting localhost as the canvas callback url is like buying something online and filling the shipping address as "my house".


For some basic information on how a Facebook application works, this is a good reading material:

http://wiki.developers.facebook.com/index.php/Anatomy_of_a_Facebook_App

polygenelubricants
hmm but wouldnt that require me to own the domain foobar.com?
Lily
Do you have the application hosted on a server somewhere?
polygenelubricants
no, not as of yet
Lily
Well, you want to take care of that part first. Find a server, host your application there. Give Facebook your app's url, that will be the canvas callback url.
polygenelubricants
so i wouldnt be able to create a desktop application, it would need to be a web based app?
Lily
The application has to be web-enabled for it to be a Facebook app, yes.
polygenelubricants
And by the way, `foobar.com` is just used as an example here. You substitute it with whatever domain name your Facebook application is hosted at.
polygenelubricants