下面是我使用 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];
}