views:

18

answers:

1

I am trying to use the new Facebook 'one-time authentication' process in my iPhone app.

The idea is that the app links out to either the Facebook app or Safari to ask the user to log in to Facebook, then Facebook returns the user to the app using a custom URL scheme.

I have set up the custom url scheme in the app, prepending 'fb' as instructed by Facebook (e.g. 'fbmyapp'). This works when typing 'fbmyapp://' into Safari - i.e. my app gets launched. This confirms that the custom URL scheme works.

I can successfully get the user to the log in page in both Safari and the Facebook app using the following call in the app:

facebook = [[Facebook alloc] init];
[facebook authorize:appId permissions:permissions delegate:self];

I have enable multi-tasking in the app (allowing the app to run in the background).

HOWEVER, upon successful login Facebook should redirect back to my app, but I get, from Safari for example: "Cannot Open Page - Safari cannot open the page because the address is invalid". I get a similar message in the Facebook app.

Any help would be greatly appreciated.

Thanks in advance.

A: 

I think that you have have the url schema wrong. You need to append your facebook app ID to fb in your app and not fb-myapp.

Hope that helps.

Spyker
Genius - That is awesome. Works perfectly! I really ought to learn to RTFM....
Happy Pig