Facebook SDK Post an der Wand auf dem iPhone App

Ich habe ein Problem mit der Implementierung des Facebook-Postings an der Wand in meiner iPhone-Anwendung. Ich habe das SDK installiert und die Anmeldung für das verknüpfte Framework funktioniert einwandfrei. Hier ist der Code:

-(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)
    {
        //
    }];
}

Ich habe jedoch ein Problem mit dem Posten von Nachrichten an der Pinnwand des Benutzers. Hier ist der Code:

-(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];
                }];

}

Hilf mir bitte. Was ist los mit meinem Code? Oder sollte ich der Anmeldeanforderung einige Berechtigungen hinzufügen?

Antworten auf die Frage(3)

Ihre Antwort auf die Frage