简体   繁体   中英

Twitter authentication with iOS

My app has twitter integration using the IOS5 twitter integration which is very easy to use and implement. My question is, is it possible to implement a sign in feature using this framework similar to one used by TweetCaster. On that app, you sign in using twitter, you get a permissions page and if you accept you can post straight to twitter from the app.

With my current integration in the app, you type in tweet in textbox in the app, click tweet button, then the Tweet controller opens up, and then you click the send button.

I would prefer them to compose the message in the app in a textview, (a hashtag would be shown which would be added onto whatever they type) then when they click send it goes straight to twitter without opening the twitter screen first.

Do these apps use the inbuilt twitter API with IOS5? Or do they use a 3rd party kit to handle this authentication?

Edit:

Apples guidelines say

"Although you may perform Twitter requests on behalf of the user, you cannot append text, images, or URLs to tweets without the user's knowledge. Hence, you can set the initial text and other content before presenting the tweet to the user but cannot change the tweet after the user views it"

Regarding the twitter framework. So I am guessing that means I cannot just append the tag onto the end of whatever they type.

I was thinking would it be possible then to have the user type in their tweet, then when they click done, a new window would appear with a textview with whatever they typed with the hashtag I want added on. This textview would not be editable, to prevent them from removing the hashtag, then they click send which would go straight to twitter. Or would Apple guidelines still have an issue with this style?

No, at the moment you cannot do this with the built in twitter framework. However, you should check out its alternatives: not only do they have additional features, but also work with older versions of iOS (3/4). These are developed by 3rd parties, but are of good enough quality to be listed on the twitter dev site: https://dev.twitter.com/docs/twitter-libraries#objectivec

The downside is that you might loose some of the simplicity of Apple's version of the framework

PS I've worked with MGTwitterEngine - it's quite nice :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM