How do I prevent the facebook login page from taking over my home page app? - ipad

I have a iPad home page app that I'm trying to integrate a facebook like button. Everything works fine if the user is already logged in, but if the user is not logged in the facebook login page takes over my app page and after login does not return to my app. Is there a way to make facebook login using an iframe?
My app is a web app not a native IOS app. It is setup with a manifest file and the user adds it to their home page. Because the app can have different URLs and all we want to do is provide like functionality, registering the app is not available to me.
What I want to know is there a way for facebook to open the login page in an iframe like the like dialog when the user clicks the like button? Right now I'm using the social plugin for the like button, but if the user isn't logged in to facebook the login page replaces my web app. Is there a way to make the login page use an iframe?

Wrapping it in a <div> worked for me

Related

Web Facebook Login Button Opens Blank Facebook Page When Clicked Inside iOS Safari View Controller

I have an iOS app I am developing that uses a Safari View Controller to open my website via the app. On the home page of my app I have implemented the Facebook SDK Login Button and everything works fine, I get logged in via Facebook and them and redirected to my website and am logged in.
On that website I have a web Facebook login button. Everything works fine when the site is accessed via Safari directly, but if I go through the app and click the Facebook login button on my site, the Safari View controller opens a blank web page that is on a facebook URL and the problem is that no content is ever displayed.

How to log out of Facebook when using a custom login button, on iOS using FBSDKLoginKit?

I am implementing a custom login button in my iOS app, using the FBSDKLoginKit CocoaPod, version 4.8.0. I already have log in working, but I can't figure out how to log out of Facebook. I am already calling logOut on an instance of FBSDKLoginManager, but that only seems to clear the currentAccessToken value. When I tap my login button again, I see a screen that looks like this:
I want to be able to log in as a different Facebook user. How can I achieve this?
In the new version of the Facebook iOS SDK (4.6 and above, I think) the default behaviour of login uses Safari View Controller. So if you are logged into Safari and have already logged into your app using Facebook, it will not ask for your credentials again and show you that screen. If you want to log in as a different user, then you will need to log out of Facebook in Safari in which case the login dialog should ask for your credentials. Also, you can remove the app from your app settings and try to login in which case it will show you the permissions screen. This behaviour of the login dialog probably follows from the best practices where a logout from an app should not cause logout from Facebook itself.

Facebook login doesn't work inside Twitter iOS App

I have a RoR / JQuery Mobile app that uses Facebook OAuth for authentication. It all works fine when accessing it via any normal browser on desktop and mobile with one exception.
If a user clicks a link to the app within the Twitter iOS app the home page loads within an internal webview. If the user then clicks 'Sign In with Facebook' the authentication seems to be successful but when Facebook redirects the user back to the app the page never loads. It just displays a blank page and the network indicator at the top of the screen just keeps spinning. If I close the web view and click the link again the page loads fine because the user has already authenticated.
Has any one else had problems with Facebook Auth inside the twitter app on iOS? Any suggestions on how I can resolve this problem? Is it possible this is just a bug with the Twitter app on iOS?
Thanks
I believe I found the solution. The facebook authentication process used a lot of redirects which I thought could be causing the problem (5 in total). After reviewing the process I realised I could remove one of the redirects and take the user directly to the page I wanted once they were authenticated.
www.example.com (link from the tweet)
www.example.com/auth/facebook (use clicks 'Login with Facebook')
1 - Redirect to: graph.facebook.com/oauth/authorize
2 - Redirect to: www.facebook.com/dialog/oauth
3 - Redirect to: www.example.com/auth/callback
4 - Redirect to: www.example.com/entry_path (This has now been removed)
5 - Redirect to: www.example.com/final_logged_in_path
The login process now works from within the Twitter iOS App.

Logout issue in new Facebook SDK 3.2

I am using Facebook SDK 3.2 in my iphone Application, i have used FBLoginView to login and logout from Facebook. and two buttons: first to post content on user's wall and second to post content on Friend's wall. In both i am using FBWebDialog. when user starts application login page opens (in safari) and everything works fine.
But i am facing following Problems:
if user want to login using another facebook id, there is no option to do it, first user have to logout from his first facebook account in safari, and when he return back to the application only then user will get the Facebook login page to login again.
when user tap FBLoginView it will open safari, but after tapping loginView, if user want to come back in the application without logging in, there is no option to do that.
In posting action i am using FBWebDialog, if i have not logged in and try to open the FBWebDialog then in dialog it shows Facebook login page to login first, but after entering user info and password for Facebook it shows a message "An error occurred. please try again later." and in the dialog if we tap "Okay" button, it shows the user is logged in, but doesn't show the page to share content. really strange behavior.
plz Help!!!!!
any help will be appreciated.

Facebook app stay login on canvas

i have a facebook app that can be access through facebook canvas or directly via the url.
so everytime my user revisit my app, they have to click on sign in again, even if within the same session(For fb canvas only, session works fine for direct)
Is there any tutorial or scripts that i can add to my webpage using javascript to check if user is a register user, and if yes, auto sign them in?
I'm using rails3 and omniauth facebook gem. Thanks.

Resources