如何在facebook ios中使用feed对话框进行签名

时间:2015-01-23 10:46:06

标签: ios objective-c iphone facebook-ios-sdk

是否有人知道如何使用Feed对话框进行签名?

目前正在使用Feed对话框进行发布。这显示为发布在

但是我希望它以这种方式显示相同的签到:在

签入

使用此代码:

//汇总对话框参数

NSMutableDictionary *params = [NSMutableDictionary
    dictionaryWithObjectsAndKeys:[dictOfferRecevied valueForKey:@"name"],
                                 @"name", @"HANGOUT ON 20 PRESTON", @"caption",
                                 [dictOfferRecevied valueForKey:@"description"],
                                 @"description",
                                 @"https://www.facebook.com/hangouton20preston",
                                 @"link",
                                 [dictOfferRecevied valueForKey:@"image"],
                                 @"picture", nil];

    // Invoke the dialog
    [FBWebDialogs presentFeedDialogModallyWithSession:nil
                                           parameters:params
                                              handler:
     ^(FBWebDialogResult result, NSURL *resultURL, NSError *error) {
         if (error) {
             // Error launching the dialog or publishing a story.
             NSLog(@"Error publishing story.");
         } else {
             if (result == FBWebDialogResultDialogNotCompleted) {
                 // User clicked the "x" icon
                 NSLog(@"User canceled story publishing.");
             } else {
                 // Handle the publish feed callback
                 NSDictionary *urlParams = [self parseURLParams:[resultURL query]];
                 if (![urlParams valueForKey:@"post_id"]) {
                     // User clicked the Cancel button
                     NSLog(@"User canceled story publishing.");
                 } else {
                     // User clicked the Share button
                     NSString *msg = [NSString stringWithFormat:
                                      @"Posted story, id: %@",
                                      [urlParams valueForKey:@"post_id"]];
                     NSLog(@"%@", msg);

                     [self dismissViewControllerAnimated:YES completion:nil];

                     [[NSNotificationCenter defaultCenter] postNotificationName:@"desginTimerView" object:nil];
                 }
             }
         }
     }];

0 个答案:

没有答案