1

我尝试使用 Sharekit 从我的 iPhone 应用程序中共享一条消息,但该消息没有出现。

这是我的代码:

-(IBAction) facebook
{
    [SHKFacebook shareText:@"test"];
}

感谢您的帮助

4

2 回答 2

1

如果您不想显示操作表,请使用此选项。

SHKItem *item = [SHKItem image:image title:title];
[SHKFacebook shareItem:item];
于 2011-12-15T16:03:18.173 回答
1

您需要创建一个 SHKItem,然后共享它。像这样的东西

 NSString* shareText = @"text";
 SHKItem* item = [SHKItem text:shareText]; // make the SHKItem
 item.title = @"Test title";

 // Make the ShareKit action sheet
 SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item];

 // Display the action sheet
 [actionSheet showInView:self.view];
于 2011-05-18T15:57:59.767 回答