views:

443

answers:

1

I'm using the Facebook connect login API for desktop apps presented here:

http://wiki.developers.facebook.com/index.php/Authorization%5Fand%5FAuthentication%5Ffor%5FDesktop%5FApplications

I'm finding that the parameters I pass arent working correctly. Here's an example of the URL I use for the site:

http://www.facebook.com/login.php?api%5Fkey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&connect%5Fdisplay=popup&v=1.0&next=http://www.facebook.com/connect/login%5Fsuccess.html&cancel%5Furl=http://www.facebook.com&fbconnect=true&return%5Fsession=true&req%5Fperms=publish%5Fstream

If the user logs in correctly, they are redirected to http://www.facebook.com/ instead of the value in the next parameter. This is particularly frustrating since the url of the site they were redirected to is supposed to contain login information. Amazingly, the cancel_ url parameter works fine and sends the user to the correct target (I tried multiple cancel_url values inside of the facebook.com domain and they worked). Anybody dealt with this?

+1  A: 

Is the API Key valid? Is your callback url set correctly in the application ? the next parameter is seeming to be ignored on non Internet Explorer Browsers.

Actually the next parameter was messing up the code in IE, so i removed the next parameter. What I did is storing the redirect back url in session and used a file to handle all facebook logins in all my domains.

http://digitalpbk.blogspot.com/2009/08/facebook-auth-next-parameter-ie.html

digitalpbk
Forgot to mention that I did actually figure it out. The app key was actually valid but the app was set as private to a group of developers (and my team forgot to include me...). FYI, the default setting for a facebook app you've created is that no one else can use the key so be sure to change that in the Facebook dashboard for your colleagues!- David
Dave

related questions