java - Get info from logged in person Facebook Graph API -
how can information logged in person via graph api?
i have looked @ graphrequest request = graphrequest.newmerequest
, , seems straight forward. how friends? taggable friends?
you can taggable friends below code
if(accesstoken.getcurrentaccesstoken() != null) { graphrequest graphrequest = graphrequest.newgraphpathrequest( accesstoken.getcurrentaccesstoken(), "me/taggable_friends", new graphrequest.callback() { @override public void oncompleted(graphresponse graphresponse) { //your code if(graphresponse != null) { jsonobject jsonobject = graphresponse.getjsonobject(); string taggablefriendsjson = jsonobject.tostring(); gson gson = new gson(); taggablefriendswrapper taggablefriendswrapper= gson.fromjson(taggablefriendsjson, taggablefriendswrapper.class); arraylist<taggablefriends> invitablefriends = new arraylist<taggablefriends>(); invitablefriends = taggablefriendswrapper.getdata(); int i; for(i = 0; < invitablefriends.size(); i++) { try { mainactivity.mymenu.add(invitablefriends.get(i).getname()); } catch(exception e){} } mainactivity.mymenu.add("tot: " + i); }else { } //response.get } } ); bundle parameters = new bundle(); parameters.putint("limit", 5000); //5000 maximum number of friends can have on facebook graphrequest.setparameters(parameters); graphrequest.executeasync(); }
Comments
Post a Comment