0

私は次のコードを使用しています。アプリを承認するFBダイアログボックスに移動し、アプリを承認した後、アプリケーションに戻ります。ただし、壁に何も投稿しないでください。

何が悪いのか考えてみませんか?

- (void) login 
{
   AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];

    appDelegate.facebook = [[Facebook alloc] initWithAppId:@"MY_APP_ID" andDelegate:self];


    NSArray* permissions =  [NSArray arrayWithObjects:@"publish_stream", nil];

    [appDelegate.facebook authorize:permissions];


    NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                   @".", @"name",
                                   @".", @"caption",
                                   nil];

    /*
     NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
     @".", @"name",
     @"Build great social apps and get more installs.", @"caption",
     @"The Facebook SDK for iOS makes it easier and faster to develop Facebook integrated iOS apps.", @"description",
     @"https://developers.facebook.com/ios", @"link",
     @"https://raw.github.com/fbsamples/ios-3.x-howtos/master/Images/iossdk_logo.png", @"picture",
     nil];
     */

    // Invoke the dialog
    [appDelegate.facebook dialog:@"feed" andParams:params andDelegate:self];


}
4

1 に答える 1

0

あなたはこのようにそれをするべきです:

graphPath = @"me/feed";
[params setObject:@"link" forKey:@"type"];
[params setObject:pict forKey:@"picture"];
[params setObject:self.url forKey:@"link"];
[params setObject:self.message forKey:@"message"];
[params setObject:self.urlName forKey:@"name"];
[params setObject:self.caption forKey:@"caption"];
[params setObject:self.urlDescription forKey:@"description"];
[appDelegate.facebook requestWithGraphPath:graphPath andParams:params andHttpMethod:@"POST" andDelegate:self];
于 2012-09-27T15:24:46.657 に答える