Well, this is done step by step; 1- You must obtain permission to the walls of friends of friends. 2- you should catch your messages (practically consuming) and compare your messages with them about the same application. 3- you have two options: you received the same post on one of your friends of friends, - you caught the user and received the necessary information. b- you will not find the slightest match - you return the message "No match found" or (404 - not found).
1-
NSArray *permissions = [[NSArray alloc] initWithObjects:
@"user_status",@"friends_status",
@"friends_about_me",@"friends_activities",
nil];
[FBSession openActiveSessionWithReadPermissions:permissions allowLoginUI:YES completionHandler: .....
`
2-
FBRequest *friendRequest = [FBRequest requestForGraphPath:@"me/friends?fields=name,status,picture,birthday,location"];
[ friendRequest startWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
NSArray *data = [result objectForKey:@"data"];
for (FBGraphObject<FBGraphUser> *friend in data) {
if ("Your user status" == [friend status]){
NsLog(@"friend @%,@% .. ",[friend name],[friend birthday], ....
}else {
NSLog(@"No match found");
}
}}];
`
source
share