I have a problem with facebook application in ios. I use cordova to build an application and when i call facebook app to open a page with a scheme "fb://profile/xxx", the facebook app will be opened.
It works well if the facebook app was connected to user's account, otherwise, after user connects to his account, it will redirect to his home page on facebook, not my page.
Any advices? Thanks!
You can add something like this after successful login confirmation check :
window.location('app.main');
alternativele, if you had set your states properly you can use :
$state.go('app.main');
I Had the same problem and after following this tutorial, I was able to make it work properly. Be sure to load this plugin
cordova plugins add org.apache.cordova.inappbrowser
This will install the Cordova InAppBrowser and add the following to your /platforms/ios/ionic-demo/config.xml file:
<feature name="InAppBrowser">
<param name="ios-package" value="CDVInAppBrowser" />
</feature>
Because of the way the InAppBrowser manages cookies internally, logging someone out via Simple Login does not properly log them out of the InAppBrowser. To make this feature work, we need to add another plugin:
$ cordova plugins add https://github.com/bez4pieci/Phonegap-Cookies-Plugin.git
Then, we need to add some code to our controller to clear the cookies whenever a user logs out. Update the $firebaseSimpleLogin:logout handler in our loginCtrl:
// Upon successful logout, reset the user object and clear cookies
$rootScope.$on("$firebaseSimpleLogin:logout", function(event) { $scope.user = null;
window.cookies.clear(function() {
console.log("Cookies cleared!");
});
});
Finally, we need to whitelist the Firebase and Firebase Simple Login domains. We can do this by adding the following towards the bottom of your platforms/ios/ionic-demo/ionic-demo-Info.plist file:
<key>ExternalHosts</key>
<array>
<string>*.firebaseio.com</string>
<string>auth.firebase.com</string>
</array>
Your plist file will look something like this:

This is not my post but this are the most important parts to follow, and in my case this fix my problem, the original post is located here:
https://www.firebase.com/blog/2014-07-25-ionic-simple-login.html ¡I hope this helps, if any questions just let me know!