Twitter and Facebook share in Swift using Social Framework

As iOS 9 is out last month, now we will code in Swift 2.0. So lets start with Twitter and Facebook share in Swift 2.0 using Social Framework.

!. Create new project Select Swift. First of all you must have Xcode 7.0 that is available on AppStore you can download your copy.

2. Add Social.Framework to your bundle

 

Twitter and Facebook share in Swift 2.0 using Social Framework
Twitter and Facebook share in Swift 2.0 using Social Framework

3. We will start with sharing text  through our App. Lets start building our view in Storyboard.

Twitter and Facebook share in Swift using Social Framework

4.  Now when we click on the share button it will open an ActionSheet to display options for share.

 

5, Now lets start with Twitter share.

 

6. Adding Facebook Share now.

 

7. Selection and closing action sheet.

 

8. Now press Share button, it will look something like this.

Twitter and Facebook share in Swift 2.0 Using Social Framework

9. Handing alerts.

 

10. You can customise it like adding image and all, just went through documentation once.

So here is our tutorial on Twitter and Facebook share in Swift using Social Framework, will be back soon with some new topic. Thanks

Add a Comment

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.