java - Can't authorize with Login Button using Facebook app -


i have problem authorization using login button in android app.

this code:

loginbutton fbbutton=(loginbutton)view.findviewbyid(r.id.fb_button); list<string> permissions = arrays.aslist("publish_actions"); fbbutton.setpublishpermissions(permissions); fbbutton.setuserinfochangedcallback(new loginbutton.userinfochangedcallback() { @override     public void onuserinfofetched(graphuser user) {         if(user!=null){             //saving username sharedpreferences         }     } }); session session = session.getactivesession(); if(session!=null && session.isopened()) {     //some actions } 

it works if haven't installed facebook app @ phone. app shows me webview , can login. if have installed facebook app @ phone app shows dialog , nothing. if app linked facebook account can login in app using facebook app.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -