OpenURL for Facebook and Twitter in app delegate?
<p>I am using Facebook SDK and Twitter SDK for login and signup.</p>
<p>But they both are not opening URL from one common method. I have written code like that below for Facebook:</p>
<pre><code>func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -&gt; Bool
{
    if(url.scheme == &quot;fb1651015905222312&quot;)
    {
        return FBSDKApplicationDelegate.sharedInstance().application(application, openURL: url, sourceApplication: sourceApplication, annotation: annotation)
    }
    return true
}
</code></pre>
<p>This works fine and, for Twitter I have to comment the above method and have to write it like:</p>
<pre><code> func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -&gt; Bool {
    if Twitter.sharedInstance().application(app, openURL:url, options: options) {
        return true
    }
    return true
}
</code></pre>
<p>This works fine for Twitter only.</p>
<p>The issue is that I need to write one common method to open their URL in <code>appDelegate</code>. So how do I overcome it?</p>
<p><strong>NOTE : We can't write both method in app delegate.</strong></p>