0

I am using Socialize framework for sharing on facebook and twitter. I am totally unaware as how to share hyperlinks on twitter using this framework. I checked out its documentation for twitter sharing thoroughly but no luck. Please shed some light on sharing hyperlink on twitter incase you have any clue.

Thanks

xrnd
  • 1,273
  • 3
  • 21
  • 38

1 Answers1

0

Yes you can do following to share.

#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];

Hope this helps you.

Durgaprasad
  • 1,910
  • 2
  • 25
  • 44
  • Well initially i was using social framework only..but this is regarding Socialize SDK..http://socialize.github.io/socialize-sdk-ios/sharing.html.. Check out. Here i dont knw how cn i Add hyperlink for twitter share. Thanks for help. – xrnd May 25 '13 at 05:13
  • k. But if you want above ios 6 then you should use go for controller provided by apple. – Durgaprasad May 25 '13 at 05:16
  • nope thats the reason i switched to socialize as i wanted compatibility with ios 5 too. – xrnd May 25 '13 at 05:19