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

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -