Android Facebook - Login / Logout Dialog -
Android Facebook - Login / Logout Dialog -
i've managed implement facebook login android app.the issue i'm facing is,on logout,whenever click logout button,i capture click of "cancel / logout" options.how go doing this?below images attached much clearer illustration.
as shown in images,how go capturing clicks in highlighted reddish circles? below attached codes login/logout activity well.thank :)
view view = inflater.inflate(r.layout.splash, container, false); loginbutton authbutton = (loginbutton) view .findviewbyid(r.id.login_button); authbutton.setfragment(this); // more permissions authbutton.setpublishpermissions(arrays .aslist("publish_actions,read_stream")); authbutton.setfragment(getparentfragment());
i post old but... had same problem you, did was: (only sure facebook sdk v2.0) 1. go bundle com.facebook.widget; 2. open file loginbutton.java; 3. go line 819 within public void onclick(view v); 4. see allert dialog? comented code follows:
alertdialog.builder builder = new alertdialog.builder(context); builder.setmessage(message) .setcancelable(true) .setpositivebutton(logout, new dialoginterface.onclicklistener() { public void onclick(dialoginterface dialog, int which) { opensession.closeandcleartokeninformation(); } }); /*.setnegativebutton(cancel, null);*/ builder.create().show();
and done!, no more annoying cancel button on dialog. (you can remove whole dialog)
android android-dialog android-dialogfragment android-facebook
Comments
Post a Comment