javascript - Chrome-only cross-domain scripting errs in Facebook iFrame App upon FB.Login(..) -
in google chrome (i'm on 9.0.597.98) facebook iframe app using graph api/javascript sdk tends throw following 2 javascript errors (see below) based on cross-domain scripting, on 1 page of app.
it goes endless retry loop on second message. after leaving overnight, reported half million retries morning!
the fb call being used login:
fb.login(function(response) { if (response.session) { // user logged in } else { // user cancelled login } });
in firefox , ie9 not these errors. it's specific chrome (maybe webkit). what's odd have second page in app uses fb.login
, works in chrome in addition other browsers. read somewhere safari has more stringent requirements on cross domain scripting - , chrome share same code base.
domains, protocols , ports must match
(error message) believe satisfied because have page works fb.login
call the other difference see between these 2 messages postmessage
query argument has different value each (bolded in messages). there 1 iframe constitutes facebook app wonder why 2 different values might used 1 after other. don't mean lead answers focus on item, did want point out.
suggestions welcome might try resolve errors.
chrome javascript console messages:
message 1: unsafe javascript attempt access frame url
https://www.facebook.com/dialog/permissions.request?api_key=168297653202478&app_id=168297653202478&display=popup&fbconnect=0&locale=en_us&method=permissions.request&next=http%3a%2f%2fstatic.ak.fbcdn.net%2fconnect%2fxd_proxy.php%23cb%3df3d15633dc%26origin%3dhttp%253a%252f%252fsubdomain.example.com%252ff22a8befa%26relation%3dopener%26transport%3d postmessage %26frame%3d f111baf6f4 %26result%3d%2522xxresulttokenxx%2522&perms=publish_stream%2coffline_access&return_session=1&sdk=joey&session_version=3 frame url http://subdomain.example.com/colonversationmap/admin.testpage.aspx?signed_request=871mifgh_-o05ponx20387xhd2ylarklu6quv8vkxy4.eyjhbgdvcml0ag0ioijitufdlvniqti1niisimlzc3vlzf9hdci6mti5odqymdewmswidxnlcii6eyjjb3vudhj5ijoiy2eilcjsb2nhbguioijlbl9vuyisimfnzsi6eyjtaw4iojixfx19. domains, protocols , ports must match.
message 2: unsafe javascript attempt access frame url
https://www.facebook.com/dialog/permissions.request?api_key=168297653202478&app_id=168297653202478&display=popup&fbconnect=0&locale=en_us&method=permissions.request&next=http%3a%2f%2fstatic.ak.fbcdn.net%2fconnect%2fxd_proxy.php%23cb%3df304d46e08%26origin%3dhttp%253a%252f%252fsubdomain.example.com%252ff23ce8203%26relation%3dopener%26transport%3d postmessage %26frame%3d fcd3637bc %26result%3d%2522xxresulttokenxx%2522&perms=publish_stream%2coffline_access&return_session=1&sdk=joey&session_version=3 frame url http://subdomain.example.com/colonversationmap/admin.testpage.aspx?signed_request=871mifgh_-o05ponx20387xhd2ylarklu6quv8vkxy4.eyjhbgdvcml0ag0ioijitufdlvniqti1niisimlzc3vlzf9hdci6mti5odqymdewmswidxnlcii6eyjjb3vudhj5ijoiy2eilcjsb2nhbguioijlbl9vuyisimfnzsi6eyjtaw4iojixfx19. domains, protocols , ports must match.
i ran issue getloginstatus() not being called in chrome. tried calling on page load , after user-initiated action no success.
it turned out not cross-domain issue. call being blocked un-passwordise extension in chrome. disabled extension, worked perfectly, on page load.
more info issue here: fb.getloginstatus never fires callback function in facebook's javascript sdk
Comments
Post a Comment