0

新的 facebook SDK 已经发布...

这在旧 SDK 中用于状态共享

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                               @"Facebook SDK for iOS", @"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
[self.facebook dialog:@"feed" andParams:params andDelegate:self];

新 SDK 中的等价物是什么

4

2 回答 2

3

它看起来与您所拥有的非常相似。从 SDK 指南:

self.postParams =
        [[NSMutableDictionary alloc] initWithObjectsAndKeys:
         @"https://developers.facebook.com/ios", @"link",
         @"https://developers.facebook.com/attachment/iossdk_logo.png", @"picture",
         @"Facebook SDK for iOS", @"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",
         nil];

发布消息不再需要委托,而是使用块:

   [FBRequestConnection startWithGraphPath:@"me/feed"
                             parameters:self.postParams
                             HTTPMethod:@"POST"
                      completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {

                          // Handle Success/Failure

                      }];

https://developers.facebook.com/docs/howtos/publish-to-feed-ios-sdk/

于 2012-08-30T14:27:26.463 回答
0

您现在可能已经找到了答案,但是您是否查看过https://developers.facebook.com/docs/howtos/feed-dialog-using-ios-sdk/

于 2013-04-11T01:50:25.413 回答