android - AccessToken.getCurrentAccessToken() is null -
i integrated facebook in app , getting proper token. if token exists assigns it, , if it's first time make request token. however, token not being received.
here code:
@override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); facebooksdk.sdkinitialize(this.getapplicationcontext()); callbackmanager = callbackmanager.factory.create(); accesstokentracker = new accesstokentracker() { @override protected void oncurrentaccesstokenchanged( accesstoken oldaccesstoken, accesstoken currentaccesstoken) { // set access token using // currentaccesstoken when it's loaded or set. } }; // if access token available assign it. accesstoken = accesstoken.getcurrentaccesstoken(); setcontentview(r.layout.activity_signup);
were able solve this? have noticed graphrequest.newmerequest
not delete old session data, return null response in oncomplete. alternative, use graphrequest.newgraphpathrequest(accesstoken, "/me"...)
, similar results.
Comments
Post a Comment