使用iOS中的社交化框架在Twitter上分享超链接

时间:2013-05-25 04:58:33

标签: ios twitter socialize-sdk

我正在使用Socialize框架在Facebook和Twitter上分享。 我完全不知道如何使用这个框架在twitter上分享超链接。我检查了它的文档,以便彻底分享twitter,但没有运气。如果您有任何线索,请在Twitter上分享超链接。

谢谢

1 个答案:

答案 0 :(得分:0)

是的,你可以做以下分享。

#import "Social/SLComposeViewController.h"
#import "Social/SLRequest.h"
SLComposeViewController *socialVc=[SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter];
                    NSData *data = UIImageJPEGRepresentation(self.defaultImageView.image, 1.0);
                    [socialVc addImage:[UIImage imageWithData:data]];
                    [socialVc setInitialText:[NSString stringWithFormat:@"%@",@"hello"]];
                    [socialVc addURL:[NSURL URLWithString:@"www.xyz.com"]];
                    [self.navigationController presentViewController:socialVc animated:YES completion:nil];

希望这会对你有所帮助。