Twikee is a library to help you promote your app or game by using the most effective marketing technique : Twitter spreading. You can use it by providing extra content (unblock features, extra lifes, etc) to users in exchange for an advertising tweet about your app.
Simply drag Twikee.h and Twikee.m into your project and you are ready to go.
Twikee should exclusively be used through his singleton method
+ (instancetype)sharedInstance;
Before trying to disply Twikee, you should consider using the following method
- (BOOL)canSendTweet;
This will return NO
if there is no Twitter account binded to device.
Then, you are ready to go with
- (void)showWithTitle:(NSString *)title tweetMessage:(NSString *)tweetMessage prefixMessage:(NSString *)prefixMessage;
This will display an UIAlertView
with the title you passed on the parameter title
. tweetMessage
is the advertising tweet you want the user to send and prefixMessage
is only an informative text to display (will not be sent with the tweet). Warning : this method will throw an exception if tweetMessage
characters count > 140.
Example :
[[Twikee sharedInstance] showWithTitle:@"Send a promoted tweet to unlock a life ?"
tweetMessage:@"Checkout the new Death Fire game @deathfire bit.ly/XXXXX"
prefixMessage:@"Preview : "];
You can also use the following method if you don't need prefixMessage
:
- (void)showWithTitle:(NSString *)title tweetMessage:(NSString *)tweetMessage;
TwikeeDelegate
provides methods that can be used to intercept events. All those methods are optional.
- (BOOL)twikeeShouldDisplay;
- (void)twikeeWillDisplay;
- (void)twikeeDidDisplay;
- (void)twikeeDidCancel;
- (void)twikeeDidSendTweet:(NSString *)tweet;
- (void)twikeeDidFailWithError:(NSError *)error;
Version 1.1
- Fix bug : request for access before fetching Twitter accounts
- Localization for English and French
Version 1.0
- Initial release