Search code examples
objective-cfacebook-ios-sdk

facebook Graph api 2.2 issue


How can i get the list of all friends using the graph api 2.2 and also i want to post the text on the friends wall. in iOS application

I tried:

[FBRequestConnection startWithGraphPath:@"/me/friends"
                             parameters:nil
                             HTTPMethod:@"GET"
                      completionHandler:^(
                                          FBRequestConnection *connection,
                                          id<FBGraphUser> result,
                                          NSError *error
                                          ) {
                          /* handle the result */

                          dicResult =(NSDictionary *) result;

                          NSLog(@"%@", dicResult);

                          [self.tblFriendListGroup reloadData];

                      }];

Solution

    • You can´t get ALL friends anymore, only those who authorized your App too.
    • You can´t post on the wall of friends. That possibility was removed many years ago because it would always be spam.

    Check out the changelog: https://developers.facebook.com/docs/apps/changelog?locale=en_GB