Post to friend's wall Facebook iOS SDK 3.1

别来无恙 提交于 2019-12-08 07:26:38

问题


According to Facebook Developer Roadmap (https://developers.facebook.com/roadmap/), they are saying that we won't be able to post to a Friend Wall except using the Feed Dialog, but feed dialog is deprecated on iOS SDK 3.1

Which is the better way to go in my case? I need a User to select from his friend list, and then post a link to their wall.

Thanks in advance


回答1:


You can use feed dialog. I think FB is going to have to keep this around. My apps are using them fine right now.

https://developers.facebook.com/docs/howtos/feed-dialog-using-ios-sdk/

- (IBAction)publishButtonAction:(id)sender {
    // Put together the dialog parameters
    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];

    // (here's another typical example of how to call that...)
    [FBWebDialogs presentFeedDialogModallyWithSession:
            YourFBSessionClass.activeSession
            parameters: params
            handler: nil];
}



回答2:


Have a look at my question Post to Friends wall on Facebook failed with Social Framework in iOS 6

I end up by sending invitation to facebook friends messages using his facebook username (username@facebook.com) through email



来源:https://stackoverflow.com/questions/14712190/post-to-friends-wall-facebook-ios-sdk-3-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!