Spring-Security-Facebook Plugin, Facebook login error - grails

I installed Spring-Security-Facebook Plugin in my app, and got the Login button in my login page.
When I am clicking on the login with Facebook button it is redirecting to facebook.com/login.php?api_key=....... and i am getting an error.
When I clicked on login with Facebook button in other websites it is redirecting to facebook.com/login.php?api_key........ and giving the login page.
I also tried the JavaScript code given in the Facebook Developers api in the page http://developers.facebook.com/docs/guides/web/. Then also I got the same problem.
I don't know where i am going wrong. I think it is problem with the url redirecting.

Make sure that you're using same site url as it configured in Facebook Developer Admin (something like http://localhost:8080/my-app/).
And also, if you setup Sandbox Mode (Settings -> Advanced), then Facebook will show you details of this error.

Related

Facebook login on Apple CNA

Questions:
Is it possible to set up Facebook login for use in the CNA?
Does CNA documentation exist for developers?
Can you debug the CNA screen using any developer tools?
Details:
I have created a captive portal login page that uses an email submission form or a Facebook login button. The login button uses javascript as documented on Facebook's developer resources to open a window and log the user in.
Testing:
CNA: Clicking the Facebook sign in button redirects to the facebook login, after multiple clicks. Facebook login page allows submission of username and password but does not generate these entries from cookies. After submission, the page is blank and login is not completed.
Full Featured Browsers: In Safari, Chrome, Firefox, etc. the social sign is functioning and works as expected. All browsers redirect the user to the login page, the user may use the email submission button or the social sign to authenticate on the hotspot and redirected to a landing page. The problems only occur on the CNA.
Research:
Forums threads state that it's impossible to use Facebook login in this way but I'm not sold because Social Sign In seems to be doing exactly what I'm proposing. They claim to accomplish the login without using apps so I have to assume their using either a CNA browser or launching Safari directly. Some javascript is functional in the CNA but I'm unable to track down resources to explain exactly what the capabilities/limitations of the CNA are.
Thanks for any help on this issue

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.

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

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

How can I log out of Facebook when using OmniAuth?

I have a RoR app using omniauth. I want to allow the user to log out so that they can sign in with a different Facebook user, but no matter what I do, once a user logs into FB, it keeps them logged in.
I have tried:
https://www.facebook.com/logout.php?next=&access_token=
To no avail. I also tried the reauth option for omniauth-facebook but that resulted in the user being brought to FB rather than to my specified redirect URL.
Its easy, add this to your javascript initialization code: (after FB.init)
FB.logout(function(response) {
FB.Auth.setAuthResponse(null, 'unknown');
setTimeout('document.location.reload()',0);
});
And the button of sign out:
Logout
Using the approach https://www.facebook.com/logout.php?next=&access_token= will make your user leave your page, as facebook won't redirect to your website again.
I hope this will solve your problem.

I get "Session Expired" when logging in to our site

Sorry for double posting probably same question but I don't think I've explained the question much on the previous one. Here's an easier to understand question:
The site I'm working on uses Devise (https://github.com/plataformatec/devise/) and Omniauth (https://github.com/intridea/omniauth) to allow users to logon via Twitter. It works well when it's used in browsers.
This is how to reproduce the problem:
User is using Twitter's IOS app
User clicks on a link of our site that was embedded in a tweet
Twitter opens our site via UIWebView
Our site requires the user to login via Twitter
The app executes Safari and redirects to Twitter's login portal, prompting the user to login
When the users submits the form, it redirects him back to our site and throws an error: "Session Expired"
Any ideas why this is happening? Or anyone experiencing the same problem?
I don't think there has been any change to this, I posted this question here that has more interaction https://dev.twitter.com/discussions/9711.

Resources