android - Facebook login with app not installed redirects to login page -
on android
followed session
login sample create login flow app working on. problem i'm having on few devices if facebook
app not installed when user logs in through facebook
via webdialog
, page seems redirect login page.
i'm using facebook
sdk 3.0.1, i've upgraded 3.5 see if fix issue, did not. sample provided in 3.0.1 sdk doesn't work , sample included 3.5 sdk performs app.
i have tried code below on other devices not have facebook
app installed , work fine. when try on nexus 7 (4.3 installed) run problem described above.
any ideas?
private session.statuscallback statuscallback = new sessionstatuscallback(); @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity); settings.addloggingbehavior(loggingbehavior.include_access_tokens); session session = session.getactivesession(); if (session == null) { if (savedinstancestate != null) { session = session.restoresession(this, null, statuscallback, savedinstancestate); } if (session == null) { session = new session(this); } session.setactivesession(session); if (session.getstate().equals(sessionstate.created_token_loaded)) { session.openforread(new session.openrequest(this).setcallback(statuscallback)); } } } @override public void onstart() { super.onstart(); session.getactivesession().addcallback(statuscallback); } @override public void onstop() { super.onstop(); session.getactivesession().removecallback(statuscallback); } @override public void onactivityresult(int requestcode, int resultcode, intent data) { super.onactivityresult(requestcode, resultcode, data); session.getactivesession().onactivityresult(this, requestcode, resultcode, data); } @override protected void onsaveinstancestate(bundle outstate) { super.onsaveinstancestate(outstate); session session = session.getactivesession(); session.savesession(session, outstate); } private void login() { session session = session.getactivesession(); if (!session.isopened() && !session.isclosed()) { session.openforread(new session.openrequest(this).setcallback(statuscallback)); } else { session.openactivesession(this, true, statuscallback); } } private void logout() { session session = session.getactivesession(); if (!session.isclosed()) { session.closeandcleartokeninformation(); } } private class sessionstatuscallback implements session.statuscallback { @override public void call(session session, sessionstate state, exception exception) { //check session , see if logged in. } }
edit: update this. i've tried same example/app on samsung galaxy s4 (running 4.2.2) model number sgh-i337, , not working on device either. little different in let hit ok if have approved app on facebook
or let go through motions allow app through facebook
, display page saying "error not logged in: not logged in. please login , try again."
edit 2:in attempt verify not exclusive our app, installed candy crush , got same error.
its error facebook, send bug report them , specify devices , apps tested , respective results. here exact same bug reported on facebook website: https://developers.facebook.com/bugs/160597354148944
facebook replied saying 'not enough evidence, closing this' maybe if post more evidence might re-open , fix this.
Comments
Post a Comment