javascript - FB Login, jquery not working on chrome -
my code looks below
$(document).ready(function () { $.getscript('//connect.facebook.net/en_uk/all.js', function () { fb.init({ appid: 'xxxxxxxxxxxx', channelurl: '//localhost/channel.html', status: true, // check login status cookie: true, // enable cookies allow server access session xfbml: true // parse xfbml }); fb.getloginstatus(function (response) { if (response.status === 'connected') { // user logged in , has authenticated // app, , response.authresponse supplies // user's id, valid access token, signed // request, , time access token // , signed request each expire dosomethinguseful(); } else if (response.status === 'not_authorized') { // user logged in facebook, // has not authenticated app } else { // user isn't logged in facebook. fb.login(function (response) { if (response.session) { dosomething(); } }); } }); }); }); above code works great on safari , firefox. however, on chrome dont see happening. debugging shows no error.
need help.
is there working example of calling fb auth using jquery?
===========
tried code http://geekswithblogs.net/ptahiliani/archive/2013/08/23/facebook-login-authentication-example.aspx. doesnt work on chrome :(. following error
'blocked frame origin "http://www.facebook.com" accessing frame origin "https://s-static.ak.facebook.com". frame requesting access has protocol of "http", frame being accessed has protocol of "https". protocols must match.'
maybe old question happened me recently.
we found when using self signed certificate grey "broken" screen in facebook. however, when visiting site directly (ie not via facebook) , accept illegit certificate visited facebook app worked fine.
seems chrome won't ask continue if detects invalid cert when pulling in page resources via https. remembers if accept 1 if requesting directly via https.
good luck :)
Comments
Post a Comment