Saturday, 15 February 2014

How can i integrate Facebook 3.1 new sdk login in android? -



How can i integrate Facebook 3.1 new sdk login in android? -

i integrating facebook3.0 in android app byfollowing link:

https://developers.facebook.com/docs/android/getting-started

in device facebook app installed.

this next to login button onclick see below code

session.openactivesession(mainactivity.this, true, new session.statuscallback() { @override public void call(session session, sessionstate state, exception exception) { log.e("session","open session"); if (session.isopened()) { straccesstoken=session.getaccesstoken(); list<string> permissions = session.getpermissions(); log.e("current permissions",""+permissions); if (!issubsetof(permissions, permissions)) { session.newpermissionsrequest newpermissionsrequest = new session .newpermissionsrequest(mainactivity.this, permissions); session.requestnewpublishpermissions(newpermissionsrequest); return; } // create request /me api request.executemerequestasync(session, new request.graphusercallback() { @override public void oncompleted(graphuser user, response response) { if (user != null) { welcome = (textview) findviewbyid(r.id.welcome); welcome.settext("hello " + user.getname() + "!"); strcurrentuser=user.getid(); log.e("current user is","current user is"+strcurrentuser); } } }); } } });

when run app shows dialog

i generating keyhash , had saved on facebook developer site.why getting dialog ,where had done mistake.please help me anyone.thanks in advance

android facebook facebook-graph-api

No comments:

Post a Comment