New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot login on IE #10
Comments
I've not tested on IE as I don't have a windows machine to test it on. Are you sure that the popups aren't being blocked and that your security settings will allow the oAuth process to complete? Also worth noting that due to security restrictions in IE 7, 8, and 9 you might need to be serving from an SSL certified host in order to do the communication with Facebook properly (if I recall correctly). |
Thanks for replying. I don't think popups are blocked as the Facebook popup is appearing. Besides, I had my domain in the list of "allowed sites" in the Pop-up Blocker settings. Just to be sure, I turned off Pop-up Blocker anyways. I am serving from an SSL certified host. When the Facebook popup appears, it has a long URL, part of it is this: When the Facebook popup goes blank after I click on "Log In", it has a long URL, part of it is this: I welcome any other suggestions or ideas. |
Have you tried using the Facebook SDK without an Angular wrapper, to see if it works? |
Yes, if I put Facebook's SDK code in index.html and call FB.login() from a controller, it works in IE9. However, there are other problems without an Angular wrapper. When a user brings up my web app in Facebook's Canvas, my web app calls getLoginStatus() and login(). Without an Angular wrapper, my program doesn't know if FB.init has finished and the calls to getLoginStatus() and login() cause errors if FB.init hasn't finished. A user wouldn't see the errors in the console and would simply get no response, which is not acceptable. Also, I sometimes get the following errors in the console, which stops the execution of my JS program, which I cannot fix:
SCRIPT438 errors are triggered when there are calls to $scope.me() and $scope.fblogin() in my AngularJS controller.
I forgot to answer your question about oAuth. I have the following
I've scoured through StackOverflow, Github and the web and I find it strange that no one else seems to have mentioned that they cannot log into Facebook on IE using Facebook's Javascript SDK in an AngularJS app. We all hate IE, especially me, but a significant percentage of the population still use IE. Do you know of a way to solve my above problems without using an Angular wrapper? |
Yes I can imagine that you hate IE quite a lot looking at all this. It does look like you are generally having a lot of problems with it even aside from the FB wrapper stuff with things disappearing from your $scope (SCRIPT438). have you tried using a more recent version of angular for all this? 1.0.4 is a very old version. |
I don't understand why AngularJS would be the cause of the problem, because the Facebook API works beautifully with Chrome and Firefox from AngularJS 1.0.4. I'm still surprised that no one else has either tried using Facebook's API from an AngularJS app on IE, or mentioned any problems with this. I'm reluctant to upgrade AngularJS. When my former-partner upgraded AngularJS in the past, we had to spend a few days to fix new problems or bugs. What was your experience like? Now my former-partner is currently busy with another project, so I would have to upgrade it. What is involved in upgrading? I searched and could not find step-by-step instructions. Do I simply run the following, as per http://stackoverflow.com/questions/18846786/how-to-install-latest-unstable-angularjs-components-using-bower ?
|
I've never had a lot of trouble upgrading Angular. 1.0.4 is a very old version. The release from the 1.0.x track that is generally considered the most stable LTS release is 1.0.8 so maybe it's worth trying that. I'm suggesting the problem is angular because you're having trouble binding to keys on your |
Didn't you have to spend a few days each time you upgraded AngularJS, to fix bugs or changes? The call to $scope.me() happens after calling FB.login() or FB.getLoginStatus and the call to $scope.fblogin() happens after calling FB.getLoginStatus(). So, there is a good probability that they are associated with the Facebook SDK. Also, those SCRIPT438 and SCRIPT5007 errors happen only when I'm using IE. No errors with Chrome and Firefox. There's a chance that AngularJS is causing these errors only for IE, but I would think that it's unlikely. Every upgrade of AngularJS seems to take a few days of work. Is 1.2.0-rc.2 stable? If so, why not upgrade to 1.2.0-rc.2 instead of 1.0.8? |
I think 1.2.16 is the latest stable release. 1.3.x branch seems reasonably stable too. I suppose the amount of time you are going to have to spend upgrading depends upon the complexity of your project. Do you have any stack traces or more detailed debug information you can share here about these errors? |
As mentioned in my first posting, $facebook.login() causes Facebook to show its popup dialog, but nothing happens after I click on "Log In". The problem happens while using Facebook's popup. So, I'm not aware of any potential stack traces or detailed debug information or how to get them. Any ideas on how to get them? If I can get around to upgrading AngularJS, I will likely use 1.2.16. 1.3.x seems bleeding edge. |
Maybe try hitting F12 once the Facebook popup has focus and using the dev tools to insect the console there? |
Good suggestion. Sounds like you're familiar with IE. When the Facebook login dialog popup appears, it shows the following in the console:
After I enter my login info and click on "Log In", nothing else appears in the console. Facebook usually shows nothing in the console. I'm still amazed that I'm the only person in the Angular/Facebook world who has this IE problem, or who has reported it. |
I think I upgraded to 1.2.16, but I'm not sure. I replaced my 1.0.4 angular.js file with the following in index.html:
I added the following:
I changed the following:
to
Now, one of my pages won't show. I haven't done a thorough test to ensure that everything is still working. Nevertheless, on quick glance, most other pages show. I tried ngFacebook on IE9 and still got the same problem. |
Can you see the login request being sent by the Facebook popup when you click login in network capture? http://msdn.microsoft.com/en-us/library/gg130952(v=vs.85).aspx |
Yes, below is what I get. The first URL appears immediately after I click on "Log In". The second URL appears when the popup goes blank and hangs. The screenshots below are details of the second (above) URL: I do not understand or get much meaning from most of this. The Frame URL in this Initiator tab is the only clue that I could see. It's a very long URL. The second screenshot below is the right end of it. At the end of this URL, it has "access_denied", "error_description", "Permissions", "error_reason", etc.
Do these screenshots provide any clue to you? Thanks for all your help. I appreciate it. |
I tried my app with your code at browserstack.com. I can login with IE11. Here are my results: Windows 7 Windows 8 Windows 8.1 According to this posting, IE still has the largest market share among browsers: http://thenextweb.com/insider/2014/02/01/ie11-passes-ie10-market-share-firefox-slips-bit-chrome-gains-back-share/ . So, even though the Linux, Mac, Chrome lovers, which includes me, hate IE, we are excluding a huge percentage of the population by not getting our code to work with IE. What do you think is different with IE11 that enables AngularJS to work? Is there anything else that we can look into? |
Off the top of my head I simply don't know, but I suspect that this is something CORS related. Commenting to keep this at the top of my stack, will take a look and post back again soon. |
I too face similar issue. When i use FF or chrome immediately after i click login in login popup it makes a GET request and fill my form with the logged in user details. Whereas when i use IE (9,10,11) nothing happens after i click login. Network tab in f12 also doesn't shows anything . |
This got dropped in favour of other work, apologies. If you are setting 'http-equiv' in a meta tag anywhere on the page you need to make sure the value is IE=8 or greater, otherwise IE10 will open the Facebook popup in IE8 mode.
|
I implemented your code into my AngularJS app and it enables me to login with Facebook on Chrome, but not IE9 (I have not tested on other versions of IE). Nothing happens when I run $facebook.getLoginStatus(). When I run $facebook.login(), I get Facebook's dialog popup. After I enter my login info and click "Log In", the popup goes blank and nothing happens after that (though, if I open Facebook.com in another tab, it has logged me in there).
I spent a couple of days on trying to figure out how to get AngularJS-integrated code to login on IE9, but am at a lost. Are you able to? I have AngularJS version 1.0.4, but I don't see why I would need to upgrade if it works on Chrome and Firefox. Any ideas?
The text was updated successfully, but these errors were encountered: