Search code examples
iospermissionstwittertweets

Twitter on ios - How is permission granted to do tweets?


I'm wondering how are permission granted? Is there a popup that asks for permission when a tweet is about to occur or is signing in with your twitter account in your settings page permission already?

I created a game where I want to do automatic tweet for the user, and i'm wondering how will I get the user's permission to do so?

I am using iOS 5's built in Twitter Framework, any help is much appreciated.

Thanks in advance.


Solution

  • If you're using the Twitter framework, then permissions are all handled by iOS itself so you don't have to do anything.

    If a user hasn't yet authorized a Twitter account with their device, iOS will prompt it for you once you attempt to use the API, and it'll handle signing in and authorizing with your application for you. Once that is done you will have access to the account from the framework. See Single Sign-On for details.

    Of course, you'll still need to handle a user rejecting the prompt and opting not to post a tweet from your application as well, and not just authorizing.