android - I cannot get user details from Google Plus -


the line plus.peopleapi.getcurrentperson(mgoogleapiclient) returns null though have signed in , app connected account.

here code:

@override public void onconnected(bundle connectionhint) {     msigninclicked = false;     toast.maketext(this, "user connected!", toast.length_long).show();     plus.peopleapi.loadvisible(mgoogleapiclient, null).setresultcallback(this);      string personname = "no one!";     if (plus.peopleapi.getcurrentperson(mgoogleapiclient) != null) {         person currentperson = plus.peopleapi.getcurrentperson(mgoogleapiclient);         personname = currentperson.getdisplayname();         string persongoogleplusprofile = currentperson.geturl();         toast.maketext(this, "welcome " + personname, toast.length_long).show();     }   } 

log cat shows: error requesting visible circles: status{statuscode=network_error, resolution = null}

you need enable google+ api in google developer console.


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -