[英]New Facebook iOS SDK posting to feed with dialog
The new facebook SDK is out... 新的facebook SDK已发布...
this was used in the old SDK for status sharing 这在旧版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];
whats the equivalent in the new SDK 新版SDK中的等效功能是什么
It looks very similar to what you have. 它看起来与您所拥有的非常相似。 From the SDK guide: 从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];
Posting the message no longer requires delegates and instead uses blocks: 发布消息不再需要委托,而是使用块:
[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/ https://developers.facebook.com/docs/howtos/publish-to-feed-ios-sdk/
您可能现在已经找到了答案,但是您是否已调查https://developers.facebook.com/docs/howtos/feed-dialog-using-ios-sdk/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.