How can we see users’ information through Facebook Graph API in Android? -
i making dating app (android) using facebook api (you know similar application starts tin…)
anyways, registered application in facebook developers , got approval use functions need through 'submit items approval'(my approved items: email, public_profile, user_photo, user_like, user_work_history, user_education_history )
so, can log in app using facebook id , can see users’ basic information too.
but! main problem cannot see photos (except public_profile) though approved this.
so need someone’s help. please me!
it great if can review code used (to use when looking @ users’ photos)
new request(session.getactivesession(), "/{user-id}/albums", null, httpmethod.get, new request.callback() { @override public void oncompleted(response response) { } }).executeasync();
hey use following code. works me.
graphrequest request = graphrequest.newmerequest( accesstoken, new graphrequest.graphjsonobjectcallback() { @override public void oncompleted( jsonobject object, graphresponse response) { // application code } }); bundle parameters = new bundle(); parameters.putstring("fields", "photos.limit(100)"); request.setparameters(parameters); request.executeasync();
try above code , jsonobject can used image urls. know response get. try graph api explorer. response format same. https://developers.facebook.com/tools/explorer
if photos of user try following code. please note need user-id photos
new request( session, "/{user-id}/photos", null, httpmethod.get, new request.callback() { public void oncompleted(response response) { /* handle result */ } } ).executeasync();
please refer https://developers.facebook.com/docs/graph-api/reference/user/photos/
Comments
Post a Comment