My "PostToTwitter" ViewController for SAOAuthTwitterEngine library. Details: "PostToTwitter" ViewController for SAOAuthTwitterEngine library. Based on UIWebView Source Code: SA_OAuthPostTwitterController.h SA_OAuthPostTwitterController.m post.html twitter_back.png Usage: @interface GLView : UIView < ..., SA_OAuthPostTwitterControllerDelegate > _twitter = [[SA_OAuthTwitterEngine alloc] initOAuthWithDelegate:self]; ... PostToTwitter(NSString* text) { [SA_OAuthPostTwitterController controllerToPost: (text) delegate: self]; } .... Delegates #pragma mark SA_OAuthPostTwitterControllerDelegate - (void) OAuthPostTwitterControllerPost: (SA_OAuthPostTwitterController *) controller text: (NSString *) text { if([_twitter isAuthorized]) { NSLog(@"Twitter send update %@ started",text); [_twitter sendUpdate:text]; } } - (void) OAuthPostTwitterControllerSkip: (SA_OAuthPostTwitterController *) controller { // do nothing or alert } // // License: // Copyright (C) 2011 Pavlo Gryb // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. This notice may not be removed or altered from any source distribution // except when more than 30% of source code was modified. (characters, excluding white spaces) // // NOTE: if you have some improvements let me know (not required) // |