peyn
peyn

Reputation: 152

Stuck with Facebook URL Scheme Suffix

I am developing an iOS application. This application has an app created on Facebook. My iOS application has two targets - free and paid.

In Xcode I set the FacebookAppID attributed to 12345 (example) in both of the targets. I also set the URL types: fb12345-free and fb12345-paid.

In Facebook I've added the -free and -paid suffixes to the configuration. I added them, because until yesterday I only had one application type - free, so no suffix was needed.

In the Xcode, in the code, I create FBSession like so:

FBSession *fb = [[FBSession alloc] initWithAppID:@"12345" 
                                   permissions:somePermissions
                                   defaultAudience:FBSessionDefaultAudienceFriends 
                                   urlSchemeSuffix:@"-free" 
                                   tokenCacheStrategy:nil];

Now, the problem is that during the tests, when I try to login to Facebook Safari redirects me to a page with non-informative message: "There was an error in application YourApp. Please try again later". This says nothing to me.

However, if I remove the suffix from the URL send to Safari, I can login easily. The problem is that Safari will not redirect me back to my app.

Same in Facebook app - I can login easily (even with suffix in the code) but FB app will not redirect me to my app.

First I though it is some sort of cache issue and that new settings for the suffixes in FB App settings were not propagated yet. But today is more then 12h after I've made the changes and still the same error persists.

Can you help me? Did you have similar issues? Any ideas?

Upvotes: 4

Views: 6959

Answers (1)

Shireesh Asthana
Shireesh Asthana

Reputation: 724

We've a bug report filed for it here(https://developers.facebook.com/bugs/543850328963454) As specified in the bug report, it's an issue with the format of urlSchemeSuffix you've provided. We should have documentation on allowed characters for the same. Thanks!

Upvotes: 2

Related Questions