I have configured Drupal for Facebook on www.whami.com. Login with Facebook works so far.
When I am logged in on Facebook and go to the canvas application on apps.facebook.com/whamicom I'm logged in inside whami. but when I click on a link inside the canvas application (i.e. http://whami.com/en/fb_cb/76bf02cc1de7338726ada37eb3dcfbd0/node/1293) the new page opens but I'm not logged in inside whami anymore.
I tracked it down to an error with the language prefix. If I disable the language prefix the link works and I remain logged in.
I have disabled the settings under "Canvas Pages" - "URL processing" because I got other weird behaviour. If the checkbox "Enable on iframe canvas pages." is set, the browser leaves the Facebook canvas and whami.com is opened in "full screen". This behaviour is similar to http://drupal.org/node/1116984 but this issue has the status "fixed".
The behavior can be seen on the links above, since the application is publicly available. I would appreciate any hint.
P.S. We're willing to pay for consulting by a DFF-expert. Configuration of DFF-Module for whami.com on Facebook canvas page for two standard use cases, no special requierments:
1. If user is logged in on Facebook but unknown on whami.com -> permission dialog -> if accepted -> create account, log in on whami inside the canvas iframe and stay logged in...
2. If user is logged in on Facebook and also known on whami.com -> Automatic login on whami.com inside the canvas iframe and stay logged in...
(3.) If user is not logged in on Facebook, simply display whami.com inside the canvas iframe as anonymous user -> there should be nothing to do here
Comments
Comment #1
Dave Cohen commentedWhen drupal upgraded from D5 to D6, someone had the bright idea to make the language prefix always come first, before any other module alters the URLs. Facebook on the other hand only allows one callback per application. So in you case that callback URL will have to be either http://whami.com/en/fb_cb/... or http://whami.com/fb_cb/... The latter will work with only the en prefix, the former will only work with the default language.
It's a shame D6 works this way. I'm aware of the problem but have not found a workaround.
See http://drupal.org/node/933772 for some user account options.
Comment #2
vlad.k commentedI had this configured in the Facebook callback: http://whami.com/fb_cb/... and the above described error occured, so this does not work at all. Now I configured http://whami.com/en/fb_cb/... and now it works in english, wich is definitely an improvement, thanks for that.
It works if the app is authorized first through the login with Facebook button on the web page. If I call the canvas page, I'm logged in on Facebook but the app is not authorized yet, I'm user anonymous inside whami. The permission request dialog does not appear. Do you have any ideas if this is also related to the language prefix?
Comment #3
Dave Cohen commentedIt sets those callbacks based on the URL where you administer drupal. So start at http://whami.com/en, then admin >> site building >> facebook apps, then edit the application settings. that way all the callbacks will have the "/en/" in them. This is safer than manually editing the remote settings.
To troubleshoot the other problem, enable the fb_devel block on your canvas them. Also grant anon and registered users permission to see devel info. Then the block should show you which user fb_devel thinks is logged into the current page.
Comment #4
vlad.k commentedIf I go to http://whami.com/en/admin/build/fb/app/whami/fb_app and save the settings, I get the following result (as displayed if I click "sync properties" again):
Are you sure you set properties for whami?
This will attempt to set the following application properties on facebook.com.
Array
(
[uninstall_url] => http://whami.com/en/fb_app/event/whami/post_remove/
[authorize_url] => http://whami.com/en/fb_app/event/whami/post_authorize/
[callback_url] => http://whami.com/enfb_cb/[API Key]/
[connect_url] => http://whami.com/
)
Please see the missing "/" after the language prefix in the [callback_url] above: http://whami.com/en(/)fb_cb/[API Key]/
I had to change back the Canvas URL on Facebook manually to "http://whami.com/en/fb_cb/[API Key]/", to actually get the application to work.