How to programmatically “follow” a Twitter channel in an iOS application?

I want to add code to my iOS application, which encourages users to “follow” my Twitter channel Twitter after they use the program X times. However, I want it to be as simple as possible for the user. What are the best methods for programmatically tracking a Twitter channel? Right now, I have a link to my Twitter channel on the Help screen, but I want to make it more visible to the user and try to get more followers.

EDIT: To clarify, I already know how to pop up UIAlert after the user opens the application 1 time. I'm interested in friction-free ways to get the user to follow my Twitter feed. If possible, I would like users to not enter their username and password if they are already logged in to Twitter. Is it possible?

+4
source share
2 answers

MGTwitterEngine implements this method

- (NSString *)enableUpdatesFor:(NSString *)username; // friendships/create (follow username) 

I do not use Twitter, but I think this is what you are looking for.

+2
source

You can count how many times didFinishLaunchingWithOptions: gets started by storing the score in NSUserDefaults. If the counter (after the increment) is a certain limit, then display a UIAlertView that will send them to your Twitter page (or, alternatively, use MGTwitterEngine to log in and follow you).

0
source

Source: https://habr.com/ru/post/1342559/


All Articles