简体   繁体   中英

facebook connect - can't login in using ie - permission denied

I'm having some issues using Internet Explorer when trying to login into my facebook app. I'm using facebook connect.

I'm using some standard facebook connect code, which you can see here - http://jsfiddle.net/M74qN/

I'm having two issues - a javascript error -

Line: 23
Char: 3884
Error: Premission denied
Code: 0
URL: MYDEVELOPMENTSITE.LOCAL

And a facebook error -

An error occurred with my-facebook-app. Please try again later.
API Error Code: 100
API Error Description: Invalid parameter
Error Message: redirect_uri URL is not properly formatted

The login works in FF & chrome.

Anyone have any idea what I'm doing wrong?


Edit - This may be something to do with it - http://bugs.developers.facebook.net/show_bug.cgi?id=19042

Although, if it was effecting the implementation of ALL facebook connect usage on IE, I presume there would be a lot more information/complaints on t'interweb.

Also, I do get a similar error on Hulu, but it still lets me authorise the app, which I can't do with mine.


EDIT 2 - After clearing cookies and looking again - the facebook error is changing to

Invalid Argument
Given URL is not allowed by the Application configuration.

The address of that page is -

https://www.facebook.com/login.php?api_key=MYAPIKEY&skip_api_login=1&display=popup&cancel_url=null%3Ffb_xd_fragment%23%3F%3D%26cb%3Df29536d8cef9e1c%26relation%3Dopener%26transport%3Dfragment%26frame%3Df3208481ca1f38c%26result%3D%2522xxRESULTTOKENxx%2522&fbconnect=1&next=https%3A%2F%2Fwww.facebook.com%2Fdialog%2Fpermissions.request%3F_path%3Dpermissions.request%26app_id%MYAPIKEY%26redirect_uri%3Dnull%253Ffb_xd_fragment%2523%253F%253D%2526cb%253Df29536d8cef9e1c%2526relation%253Dopener%2526transport%253Dfragment%2526frame%253Df3208481ca1f38c%2526result%253D%252522xxRESULTTOKENxx%252522%26sdk%3Djoey%26display%3Dpopup%26api_key%MYAPIKEY%26fbconnect%3D1%26locale%3Den_US%26return_session%3D1%26session_version%3D3%26from_login%3D1&rcount=1

I'm thinking it must be something to with this - redirect_uri%3Dnull in the url params.

But I've no idea how to change that, and also am bewildered as to why it's an ie only issue.

As an aside, it must be said that the Facebook developer forums are truly awful.

I've managed to get it working by adding a Custom Channel URL, as per this page - https://developers.facebook.com/docs/reference/javascript/FB.init/

Seemed to work, but I'm still not sure why I had the error in the first place so I'm going to leave the question open for the moment to see if anyone can give a better answer.

This is most likely coming up because you have configured your Facebook Developers account to point to a specific URL on the web, and you are developing locally - meaning the URL that Facebook looks for is www.mydomain.com , however you are running on a local test server (most likely), so it's only finding localhost:7689// (just an example).

There's ways around this, but in my experience, I've just deployed a hidden subdomain (or password protected one), to the ACTUAL domain, and tested it there, and then move the code over to your regular domain once it works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM