![](/img/trans.png)
[英]iPhone - How to send image + text to Facebook using ShareKit?
[英]Sharekit not populating facebook text box
这是我使用的代码。 我能够看到弹出窗口,但看不到Facebook弹出窗口中预先填充的文本。
有什么建议么?
- (IBAction) shareViaFacebook
{
[self prepareToShare];
// create the item to share
NSString *share = [NSString stringWithFormat:@"I'm tracking %@ in some stuff, check it out! http://somewebsite.com/g/%d @TEST",
self.game.name,
[self.game.serverId intValue]];
SHKItem *item = [SHKItem text:share];
// share the item
[SHKFacebook shareItem:item];
}
在同一年龄段,适用于twitter的以下代码也可以正常工作。 那就是一切都被填充
- (IBAction) shareViaTwitter
{
[self prepareToShare];
// create the item to share
NSString *share = [NSString stringWithFormat:@"I'm tracking %@ in some stuff, check it out! http://somewebsite.com/g/%d @TEST",
self.game.name,
[self.game.serverId intValue]];
SHKItem *item = [SHKItem text:share];
// share the item
[SHKTwitter shareItem:item];
}
这是我的项目中使用ShareKit的示例:
NSString *finalPostedString = [[NSString alloc] initWithFormat:@"Check out this"];
SHKItem *item1= [SHKItem text:finalPostedString];
SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item1];
[actionSheet showInView:self];
试试看,希望对您有所帮助。
编辑:或更具体地说,请检查此线程,该线程也应回答您的问题: iPhone / iOS-如何使用“ ShareKit”仅发布到Facebook或仅发布到Twitter
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.