下面是我使用 Sharekit 将图像和标题发送到 Facebook 的方法。我还想随 Facebook 帖子一起发送 URL。如果我尝试
SHKItem *item = [SHKItem image:image url:url title:titleString];
我收到太多参数错误消息。有谁对如何做到这一点有任何想法?感谢您的帮助。
- (IBAction)myButtonHandlerAction
{
NSURL *url = [NSURL URLWithString:@"http://example.com/"];
NSString *titleString = [[NSString alloc] initWithFormat:@"*** %@ * \n\nGet the ***** App - It's Free!", entity.name];
UIImage *image = [[[UIImage alloc] initWithData:entity.image] autorelease];
SHKItem *item = [SHKItem image:image title:titleString];
// Get the ShareKit action sheet
SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item];
// Display the action sheet
[actionSheet showFromBarButtonItem:barbtn animated:YES];
}
最佳答案
没有方法-[SHKItem image:url:title:]
。因此会引发错误。目前,没有任何机制可以使用 ShareKit 执行您需要的操作,因此您必须根据您的需求自定义 ShareKit。您还应该查看Graph API .
关于iphone - Sharekit - 发送 url 链接到 Facebook,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6024321/