As you can see, this is a problem because I can only return one URL handler, but I need to be able to decide which one.

In my app delegate, I have commented out the Instagram option above and left only Facebook. As expected, Facebook will work just fine, but I get this error when I tap authorize on Instagram:

Obviously, Facebook is trying to handle the return URL from Instagram so it will error.

Is it plausible to check the URL to see if it contains the app ID for each service I am trying? So if URL contains the instagram ID, then return the instagram handler, if it contains the Facebook ID, then return the Facebook Handler.