ios - Fetching facebook friends of user -


i trying fetch facebook friend list of user returning count of friends.bellow code .is there wrong in code?

-(void)loginviewfetcheduserinfo:(fbloginview *)loginview user:(id<fbgraphuser>)user { [fbrequestconnection startwithgraphpath:@"/me/friends"                                      parameters:nil                                      httpmethod:@"get"                               completionhandler:^(                                                   fbrequestconnection *connection,                                                   id result,                                                   nserror *error                                                   ) {                                   nslog(@"me/friends result=%@",result);                                    nslog(@"me/friends error = %@", error.description);                                    nsarray *friendlist = [result objectforkey:@"data"];                                   //[m_allfriends addobjectsfromarray: friendlist];                               }]; } 

when registered app facebook. facebook provide 3 permission , these permission default approved

user_friends provides access person's list of friends use app. permission approved default.

according can friend use app. check link https://developers.facebook.com/docs/graph-api/reference/v2.3/user/friends


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -