Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple posts to Facebook and Twitter iOS 5 & 6

I'm currently implementing a simple button that posts to social networking sites (giving my app a little exposure, you know the drill). However, I'm a little confused by all this social networking stuff. On one hand I know iOS 6 has a really nice framework for FB and Twitter (Social.framework) but for iOS 5 it's a little different. iOS 6, I think I've got figured... I find it a little weirder when we go into iOS 5 however. From what I understand Twitter was already integrated into iOS 5 and can be accessed using the Twitter.framework and Account.framework frameworks. What I don't get is in order to support both 5 & 6 for Twitter do I have to use Social.framework, Twitter.framework and Account.framework to support everything? I.e. two different methods depending on iOS version. Or, if I use the latest SDK will iOS 5 twitter work with Social.framework? That Twitter covered.

Now for Facebook, how do I go about posting in iOS 5? I'm pretty sure Social.framework won't work in iOS 5, even if I build the app with latest SDK. Therefore I think it's inevitable that I'll have to have two different methods which run depending on the iOS version installed. Is that correct? If so, how do I go about integrating FB into iOS 5? Do I have to use the SDKs provided by Facebook?

So to summarise my questions if all that was a little wordy.

1) Can I incorporate Twitter-posting into my app using only Social.framework for both iOS 5 & 6, or do I have to do one method using Social.framework (for iOS 6) and then another method using Twitter.framework and Account.framework (iOS 5)?

2) I can use Social.framework for Facebook in iOS 6, but can't for iOS 5, therefore, I have to do two separate methods, one with Social.framework (iOS 6) and then one with the FB SDK (iOS 5), correct?

Thanks in advance,
Regards,
Mike

like image 894
Mackey18 Avatar asked Apr 19 '13 12:04

Mackey18


People also ask

How do you post to both Twitter and Facebook?

Go to your Twitter account's settings, then the Profile tab (or go to the Twitter app on Facebook(Opens in a new window)). There's a big ol' "Connect to Facebook" button right at the bottom. Click it and everything you tweet will also go on your Facebook timeline and the News Feeds of all your friends.

How do I post via IOS?

At the top of your notifications are 2 buttons. One says "tap to tweet" the other says "tap to post" and has a FB icon. Click "tap to post" that has the FB icon, type your message and it WILL show up on your wall as "posted via IOS".


1 Answers

1) Social.Framework is available only on iOS6+ so you have to split between the two frameworks (or you can use only Twitter.Framework even though some methods have been deprecated on iOS6)

2) You can use the Facebook SDK both on iOS5 and iOS6 (latest version for iOS at the time i write this answer is 3.5). The Facebook SDK already takes care of using the user's Facebook account on iOS6 or relying on the Facebook app on iOS5 or iOS6 when the account is not already configured in the phone

like image 135
andreag Avatar answered Oct 17 '22 00:10

andreag