i m using facebook_skd_3.1 (Xcode ios 4.5) i got the friends list by calling
FBFriendPickerViewController, on clicking done button i have tried to post the message
on the selected friends wall but i got this error :-
Warning: Attempt to dismiss from view controller
while a presentation or dismiss is in progress!
2012-12-06 19:37:09.187 ........project[5474:19a03] Error: HTTP status code: 403
error in the alert view
error =Error Domain=com.facebook.sdk code=5" ..........
message = "(#200)the user hasn't authorized the application to perform this action";
type = OAuthException
};
};
code=403;
com.acebook.sdk:HTTPStatuscode=403}
code :-
-(void)facebookViewControllerDoneWasPressed:(id)sender {
NSString* userid;
for (id<FBGraphUser> user in self.friendPickerController.selection)
{
NSLog(@"\nuser=%@\n", user);
userid = user.id;
}
NSMutableDictionary* dictaram = [[NSMutableDictionary alloc]
initWithObjectsAndKeys:@"like this!", @"message", nil];
[FBRequestConnection startWithGraphPath:[NSString stringWithFormat:@"%@/feed", userid]
parameters:params HTTPMethod:@"POST"
completionHandler:^(FBRequestConnection *connection, id result, NSError *error)
{
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Shared"
message:[NSString stringWithFormat:@ %@! error=%@", fbUserName, error]
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alertView show];
}
];
[self dismissModalViewControllerAnimated:YES];
Do i need some permissions or there is some coding error please help.
thanks in advance.