Facebook sdk post na ścianie w aplikacji na iPhone'a

Mam problem z wdrożeniem publikacji na Facebooku na ścianie w mojej aplikacji na iPhone'a. Zainstalowałem pakiet SDK, a logowanie do połączonej struktury działa poprawnie. oto kod:

-(IBAction)loginButtonPressed:(id)sender
{
    NSLog(@"loginButtonPressed: called");

    AppDelegate *appdel=[[UIApplication sharedApplication] delegate];
    appdel.facebookSession=[[FBSession alloc] init];
    [appdel.facebookSession openWithCompletionHandler:^(FBSession *session, 
                                                     FBSessionState status, 
                                                     NSError *error)
    {
        //
    }];
}

Ale mam problem z wysłaniem wiadomości na ścianę użytkownika. Oto kod:

-(IBAction)likeButtonPressed:(id)sender
{
    NSLog(@"likeButtonPressed: called");
    // Post a status update to the user's feedm via the Graph API, and display an alert view 
    // with the results or an error.

    NSString *message = @"test message";
    NSDictionary *params = [NSDictionary dictionaryWithObject:message forKey:@"message"];

    // use the "startWith" helper static on FBRequest to both create and start a request, with
    // a specified completion handler.
    [FBRequest startWithGraphPath:@"me/feed"
                       parameters:params
                       HTTPMethod:@"POST"
                completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {

                    [self showAlert:message result:result error:error];
                }];

}

Pomóż mi proszę. Co jest nie tak z moim kodem? Czy powinienem dodać trochę uprawnień do logowania?

questionAnswers(3)

yourAnswerToTheQuestion