Callback from Facebook to <url>

software development

#1

I’m probably biting off more than I can chew, for a rusty programmer, but here goes.

I’m running a (trivial) index.php test app for Facebook; finished app to be hosted on DreamHost. The app is registered in Facebook to be at domain.com/subdir/subsubdir directory.

It seems to run ok initially when called by browser http://subdir.domain.com/subsubdir; it goes to a login screen in Facebook and the url in browser at this point is:
http://www.facebook.com/login.php?v=1.0&api_key=xxx&next=http://subdir.domain.com/subsubdir/

After login by user, it tries to get to the callback url registered with Facebook but then crashes; a look at the browser url shows why:
http://domain.com/subdir/subsubdirhttp://subdir.domain.com/subsubdir?auth_token=yyy

Notice that the two url’s (which are equivalent based on the default webpage setting in DreamHost) are concatenated instead of one overwriting the other. It works ok when either of the url is deleted, proving that the returned auth_token is valid.

Is there an obvious setting in the DreamHost webserver or in my browser that should be changed so that there is a correct overwriting of one url over the other. If not, I’m guessing that this might be a Facebook bug.

Thanks
-CLK


#2

I have had the same issue. I don’t think it is dreamhost issue. If your app is embedded inside a panel and you just generate fbml code, just set up a test site and prod version… and create the test app in faceboook developer.

THEN instead of pointing http://subdir.domain.com/subsubdir just use what the user would use… http://apps.facebook.com/yourapp_dev (or whatever you called your test app). The nice thing about that (if you are using a panel) is that you just write a script to “promote” your code when you are ready for a release.


#3

Thanks for reply.
That works; at least it does now but it seemed flaky when I first tried it a few days ago. My test app on facebook is running.

I assume when you say “promote your code” you are referring to entering the callback url, which would be where my app is actually located/running, when I ‘register’ the app in facebook; but don’t know what you’re referring to about writing a script to do that. Just trying to clarify for other forum readers.

Thanks, again.