Stuck with Facebook URL Schema Suffix

I am developing an iOS application. This application has an application created on Facebook. The iOS application has two goals - free and paid.

In Xcode I installed FacebookAppID assigned to 12345 (example) for both purposes. I also set the URL types: fb12345-free and fb12345-paid.

On Facebook, I added free and paid suffixes to the configuration. I added them, because until yesterday I had only one type of application - for free, so the suffix is โ€‹โ€‹not needed.

In Xcode in code, I create an FBSession as follows:

 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 log into Facebook , Safari redirects me to a page with an uninformative message: "There was an error in application YourApp. Please try again later". It doesnโ€™t tell me anything.

However, if I remove the suffix from the URL sent to Safari, I can easily log in. The problem is that Safari will not redirect me back to my application.

The same goes for the Facebook app - I can easily log in (even with a suffix in the code), but the FB app will not redirect me to my app.

At first I, although this is some kind of cache problem, and that the new settings for suffixes in the settings of the FB App have not yet been distributed. But today it is more than 12 hours after the changes are made, and the same error still persists.

Could you help me? Have you had similar problems? Any ideas?

+4
source share
1 answer

We have the error report specified here (https://developers.facebook.com/bugs/543850328963454) As indicated in the error report, this is a problem with the urlSchemeSuffix format that you provided. We must have documentation for valid characters. Thanks!

+2
source

Source: https://habr.com/ru/post/1439814/


All Articles