I followed this guide and I’ve created my app successfully with Facebook integration.
What’s the problem?
When the user has to do the login, the app quits in the browser (or in Facebook app, if is installed)
How do I keep authentication entirely in-app?
The point of the oAuth login is that it doesn’t happen within your application. It uses fast-app switching to perform the authentication in a trusted environment (either Safari or the Facebook application).
However, you can modify Facebook.m to do the authentication within your application, but you user’s credentials will not be remembered. You can see that if your iOS device doesn’t support multi-tasking, there is a backup login dialog.
Excerpt from Facebook.m (around line 160):
If you remove the first conditional and it’s containing code and set didOpenOtherApp to NO, you can get the behavior you are looking for.