android facebook java get user name with Graph API -
i name user id graph api, have user id select query
https://graph.facebook.com/"+id+"?fields=name
i don't know how call http/url query , retrieve data?
since using android sdk, can make graph api calls this-
bundle params = new bundle(); params.putstring("fields", "name"); final string requestid = {actor-id}; request request = new request(session, requestid, params, httpmethod.get, new request.callback() { public void oncompleted(response response) { graphobject graphobject = response.getgraphobject(); facebookrequesterror error = response.geterror(); if (graphobject != null) { if (graphobject.getproperty("id") != null) { string name = (string)graphobject.getproperty("name"); } } } }); request.executeandwait(request);
Comments
Post a Comment