objective c - iOS: get the friend list -



objective c - iOS: get the friend list -

i want friend list facebook sdk , this:

- (ibaction)buttontouched:(id)sender { // if session state of 2 "open" states when button clicked if (fbsession.activesession.state == fbsessionstateopen || fbsession.activesession.state == fbsessionstateopentokenextended) { fbrequest* friendsrequest = [fbrequest requestformyfriends]; [friendsrequest startwithcompletionhandler: ^(fbrequestconnection *connection, nsdictionary* result, nserror *error) { nslog(@"result:%@", result); friend_list_array = [[nsmutablearray alloc] initwitharray:[result objectforkey:@"data"]]; facebookchallengeviewcontroller *facebook_v = [[facebookchallengeviewcontroller alloc] initwithnibname:@"facebookchallengeviewcontroller" bundle:nil witharray:friend_list_array]; [facebook_v setmodaltransitionstyle:uimodaltransitionstylefliphorizontal]; [facebook_v setmodalpresentationstyle:uimodalpresentationformsheet]; [self presentviewcontroller:facebook_v animated:yes completion:nil]; facebook_v.view.superview.center = cgpointmake(self.view.frame.size.width/2, self.view.frame.size.height/2); }]; } else { // open session showing user login ui // must inquire basic_info permissions when opening session [fbsession openactivesessionwithreadpermissions:@[@"public_profile",@"user_friends"] allowloginui:yes completionhandler: ^(fbsession *session, fbsessionstate state, nserror *error) { // retrieve app delegate appdelegate* appdelegate =(appdelegate*) [uiapplication sharedapplication].delegate; // phone call app delegate's sessionstatechanged:state:error method handle session state changes [appdelegate sessionstatechanged:session state:state error:error]; }]; } }

the problem "friend_list_array" have people accepted te request , not friend, what's problem?

ios objective-c facebook-sdk-3.0

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -