i trying fetch work info fb friends on ios using facebook sdk. here's code using:
if (fbsession.activesession.isopen) { nsmutabledictionary * params = [nsmutabledictionary dictionarywithobjectsandkeys: @"work", @"fields", nil]; fbrequest *request = [fbrequest requestwithgraphpath:@"me/friends" parameters:params httpmethod:@"get"]; [request startwithcompletionhandler: ^(fbrequestconnection *connection, nsdictionary *result, nserror *error) { if (!error) { if (result) { if (result.count) { nsmutablearray *friendswithjobtitles = [nsmutablearray array]; (id afriend in [result objectforkey:@"data"]) { if ([afriend objectforkey:@"work"]) { [friendswithjobtitles addobject:afriend]; } } nslog(@"result = %@", friendswithjobtitles); } } } }]; }
the friendswithjobtitles blank reason. please help.
Comments
Post a Comment