Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

How to implement share functionality in iOS? e.g. allow the user to share a random fact?

I'm trying to extend the Fun Facts application and I'm wanting to be able to share the facts (like on Android, I was able to put in a share button where if you clicked it, you could share the fact to a text message, facebook, twitter, etc). How can I do this?

3 Answers

Hey Naomi,

I found a couple of youtube videos to put you on the right track. How to share threw twitter, facebook and Messages

Hope this helps,

Ozzie

If I were you, I'd start out by looking into Social.framework

Thanks guys! that was helpful & I was able to connect it to Twitter and Facebook. I still can't figure out how to share via text message through. How can I do that?

Updated my previous answer. The method is not as direct has my the twitter example. I am sure there is a better way if you where to look threw the documentation, but this is the best I could find for video tutorial at this time.

Ozzie

thanks Ozzie!