Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to share posts in twitter by using SLComposeViewController in iOS?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 453
    Comment on it

    We can share posts in twitter by using following steps.

    First add one button on view controller and give action to it.

    import one in your project that is-> #import <Social/Social.h>

    Now in button action write following code->
     

    - (IBAction)twitterButtonAction:(id)sender {
        
        SLComposeViewController *tweetSheet = [SLComposeViewController
                                               composeViewControllerForServiceType:SLServiceTypeTwitter];
        [tweetSheet setInitialText:@"My tweet"];
      [self presentViewController:tweetSheet animated:NO completion:nil];
    
    }
    
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: