【发布时间】:2014-02-26 07:32:17
【问题描述】:
我想setinitialtext 以这种方式发布到时间线。它应该像下面这样说,我想为 GlanseApp text only 设置一个 URL
NSString *KSocialSharingTextFBPT=@" Just discovered this great item via [GlanseApp](https://itunes.apple.com/us/app/glanse/id762075664?mt=8) for iPhone"
我怎样才能做到这一点?
这里是分享代码
SLComposeViewController *composeController = [SLComposeViewController
composeViewControllerForServiceType:SLServiceTypeFacebook];
[composeController setInitialText:KSocialSharingTextFBPT];
[composeController addImage:image];
[composeController addURL: [NSURL URLWithString:[product objectForKey:@"producturl"]]];
composeController.completionHandler =^(SLComposeViewControllerResult result) {
switch(result) {
// This means the user cancelled without sending the Tweet
case SLComposeViewControllerResultCancelled:
break;
// This means the user hit 'Send'
case SLComposeViewControllerResultDone:
break;
}
};
【问题讨论】:
标签: ios iphone social-networking sharing