我正在使用 facebook sdk 3.0
它很容易安装,但我发现了一些奇怪的东西
我无法显示链接的缩略图
检查我的代码,它很短
NSString *message = [NSString stringWithFormat:@"%@ is reading this news : \n %@",
self.loggedInUser.first_name,[[dataList objectAtIndex:index] objectForKey:@"NewsURL"]];
[FBRequestConnection startForPostStatusUpdate:message completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
// [self showAlert:message result:result error:error];
}];
就是这样~
但它只在墙上贴了一个链接,没有图像......
我尝试发布相同的 url 来更新状态,它可以显示拇指图像,
这是示例网址
当我使用 Facebook api 时我错过了什么???
任何回复或回答都会有所帮助
谢谢
韦伯
** * ** * ** * ** * ** * *编辑* ** * ** * ** * ** * ** * ****
它需要使用FBRequestConnection startWithGraphPath
所以,这是我的最终解决方案
NSMutableDictionary *postParams = [[NSMutableDictionary alloc] initWithObjectsAndKeys:newsURL, @"link",
newsTitle,@"name",nil];
[FBRequestConnection startWithGraphPath:@"me/feed"
parameters:postParams
HTTPMethod:@"POST"
completionHandler:^(FBRequestConnection *connection,id result,NSError *error) {
}];
[postParams release];
也请参考这个链接