Facebook FB.login popup opens invalid URL - facebook

In my website i am using FB Javascript SDK for providing my users to login with their FaceBook account instead of filling up register form.
The problem is from today morning, when i click on the "Signin with Facebook" button, it opens popup with the URL
https://www./login.php?skip_api_login=1
instead of https://www.facebook.com/login.php which is not a valid url.
why the URL is comming like this ?

I am having the same issue (I would just post a comment but apparently you need 50 rep) so this is not a complete answer. To provide more info it seems it may be a temporary bug, if the user you've been logging in as is currently logged into facebook, the user is logged in straight away. If the user isn't, this loggin error occurs. Obviously once it perceives it that way, you can't go back to a new user because it skips the loggin screen. Perhaps facebook is expecting that user to be logged in which leads to this errornous way of dealing with it.

Related

Facebook log in - auto refresh page

I have a problem. When somebody is not logged in facebook and "likes" with the facebook plugin, he is asked to log in facebook. He does it and he has to click on "like" again.
I would like in this situation, just after the guy has logged in to auto-refresh my page (for updating other infos). Is there a way to do that ? Should I use a kind of listener of FB loggin ?
In that case, I think no - if the login was processed by your own app using the Javascript SDK you could detect the login (which is a necessary part of the login flow) and put something in your login-handling code to refresh the Like buttons so that when they refresh they're aware the user has logged in.
In the case where the user triggers the login via the like button itself, I don't think there's any way to detect this event

Facebook Logout Button for My Website (Not Facebook Connect Logout)

I was wondering if it is possible to create a "logout" button for my site that will log a user out of facebook and then redirect them to a specific URL ? Let me elaborate, I work in a retail store and I have a mounted iPad so customers can "like" our facebook page (by using a traditional facebook like button). Currently, when customer's select "like" it opens a new window where facebook asks for a username and password, and then immediately after the customer hits "Submit" it re-directs them back to a specific URL where I say "thanks for liking us"...the only problem is that it keeps them logged into facebook.
I'm hoping to put a logout button on my "thank you for liking us" URL so they can click that to logout (without going back to facebook) and then it re-directs back to the page with the like button for the next customer.
I have tried facebook connect but it's so many steps because users have to allow the app etc. that I'm hoping to avoid that. Maybe a way that clears the facebook cookies or anything else? I'm so out of ideas that anything will help!
Include the Facebook JS SDK and then call FB.logout() either on click of the link, or on the thank you page.
Tested, not working even with FB.logout(), because once you logged in facebook.com, then fb cookie will be injected automatically, there's no way to remove it unless you've logout from facebook.com.:/

facebook logout without sdk

How can I log out user from facebook without authorizing him myself?
I have a public IPad which people come to, authorize in my application and do stuff.
One of the links leads to m.facebook.com/sharer.php?u=..
When the user presses it, he is redirected to facebook, which asks for his login/pass and makes the share.
Later then the user press Logout on my site
I need to log out him from facebook some way,
so the next user who will use the ipad and press share will post to his wall and not to the first user's .
Same happens when i provide the iframe version of the Like button.
The first user logs in to facebook, makes the like, logs out of my web site,
and the next user see the like button pressed.
Thanks in advance ;)
I've just done some work with facebook recently on one of my projects and I used to visit a url to log them out it was something like
http://www.facebook.com/logout.php?redirect=your_url
It may not exactly be that as its off the top off my head but after visiting that the user got redirected to my site again logged out of facebook.
You may also have to provide a token.
Hope this helps!

Authenticate to Facebook without Clicking Facebook Connect Button

I have added Facebook Connect to my application via the JavaScript SDK. I'm using Spring Security (this is a grails app) and I have added code that when someone clicks the FB Connection button to login, I manually authenticate them against their user account and everything gets wired up appropriately. I have 2 questions:
When a user first logs in with FB and I don't have an account for them, I create an account for them with their FB info, generate a random password, and use their email for their login name. If the user then uses the regular login form instead of the FB button to sign in, how do I sign them in to FB as well?
Every time the user clicks the FB Connect button, the popup window shows up. If they are already authenticated, it just goes away and then my web site redirects correctly. How do I keep the popup window from showing up in this case?
Thanks
To you first question, the user might be connect on Facebook when landing on your page after registration. So you can rely on the Javascript SDK to help you out.
See here: http://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus
To your second question, I think you can't, except you might get a work around if you use the Javascript SDK mentioned for the first question!
This is how I did it for moviezine.se and it works just fine, but it might be a little irritating to be logged in without asking for it when you come back a few days later. Then there is the use case of the logout: if you are automatically logged in, are you automatically logged out too; and if not, what if your Facebook session is replaced by your girlfriend's one who is also a user on your site! :)

Facebook Connect Bug? (Post-Authorise URL Being Put in Window Instead of OnLogin Callback)

I have a ASP.NET web site which uses Facebook Connect for authentication - using the JavaScript API and the Facebook Connect FBML Button.
Here is the regular flow of events for a "Connect with Facebook" button click, when user isnt logged into Facebook.
Dialog is shown requesting user to login
Dialog requests permission from the user for basic info permission
The popup is closed
The callback function i supplied for "onlogin" is fired.
All good.
Now - here's what i think is a bug: the user is already authenticated to Facebook, but has not authorised my app.
This is the flow:
Dialog is shown requesting permission from the user for basic info permission
The URL for the popup changes to http://rootofmysite.com/?installed=1&token=3e3920d309
The user is left wondering what is going on, and the onlogin callback is NOT fired.
So, the popup window is replaced with my original site, and in the querystring is the OAuth token? This looks to be the "Post-Authorise Callback" URL which used to be in the Facebook Application Settings - but has been removed. Anyway, i dont care about this URL - i request permissions/authorization using the client-side JavaScript API, as im a sure a lot of people do.
I understand the user is already authenticated, so they wouldn't need to login again, but what i dont understand is a) why the "onlogin" event handler is not called, and b) why on earth are they replacing THEIR dialog with my site and the OAuth token in the url?
At the moment, i am trying to do a "creative workaround" where i detect this URL and close the popup and call my "onlogin" handler manually (what Facebook SHOULD be doing).
Still, quite dodgy.
EDIT
It's another bug peoples. Please vote for it so they fix it.
It's a (unconfirmed) bug.
http://bugs.developers.facebook.net/show_bug.cgi?id=12260
Hopefully it gets more votes so it gets fixed - vote people!
In the meantime, i am (attempting) to employ the following 'creative workaround':
Add logic to my Default.aspx page to detect that URL they are redirecting to in the popup.
Redirect to my page, FacebookInboundAuthorization.aspx, preserving querystring.
On load of that page, register some JavaScript to close the popup and manually fire the "onlogin" event handler for my button.
EDIT
To clarify my above, i didnt mean "vote people" as in to vote for my answer here, i meant vote for the bug on Bugzilla (so that FB accept it as an issue and fix it).