{"id":18271997,"url":"https://github.com/st3fan/iphone-twitter","last_synced_at":"2026-02-01T01:41:28.162Z","repository":{"id":895086,"uuid":"647811","full_name":"st3fan/iphone-twitter","owner":"st3fan","description":"iPhone Twitter Framework","archived":false,"fork":false,"pushed_at":"2011-10-20T06:33:48.000Z","size":496,"stargazers_count":88,"open_issues_count":10,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-02T00:11:59.764Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/st3fan.png","metadata":{"files":{"readme":"README.textile","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-05-05T04:09:38.000Z","updated_at":"2025-04-01T05:56:52.000Z","dependencies_parsed_at":"2022-08-16T11:20:43.488Z","dependency_job_id":null,"html_url":"https://github.com/st3fan/iphone-twitter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st3fan%2Fiphone-twitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st3fan%2Fiphone-twitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st3fan%2Fiphone-twitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/st3fan%2Fiphone-twitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/st3fan","download_url":"https://codeload.github.com/st3fan/iphone-twitter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247279320,"owners_count":20912865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T11:39:38.973Z","updated_at":"2026-02-01T01:41:28.130Z","avatar_url":"https://github.com/st3fan.png","language":"Objective-C","funding_links":[],"categories":["etc"],"sub_categories":[],"readme":"h1=. Objective-C / iPhone Twitter API\n\np=. Version 0.1 -- Open Source (Apache License)\n\np=. By \"Stefan Arentz\":mailto:stefan@arentz.ca, May 6th, 2010\n\nh2. Introduction\n\nThis is a simple Objective-C API and GUI to access Twitter. The project includes ready-to-go interfaces for a login screen and a tweet composer.\n\nThe library uses Twitter's XAuth authentication method. This is a new authentication method that does not need a web view to let the user login. Using XAuth you can ask the user for her username and password using a native GUI.\n\nThe API is fully asynchronous and can be easily embedded in any project. There are no dependencies on other libraries.\n\nh2. Screenshots\n\n\u003cimg src=\"http://stefan.arentz.ca/stuff/TwitterGui-2010.05.07-1-Thumb.png\"/\u003e \u003cimg src=\"http://stefan.arentz.ca/stuff/TwitterGui-2010.05.07-2-Thumb.png\"/\u003e \u003cimg src=\"http://stefan.arentz.ca/stuff/TwitterGui-2010.05.07-3-Thumb.png\"/\u003e \u003cimg src=\"http://stefan.arentz.ca/stuff/TwitterGui-2010.05.07-4-Thumb.png\"/\u003e \u003cimg src=\"http://stefan.arentz.ca/stuff/TwitterGui-2010.05.07-5-Thumb.png\"/\u003e\n\nh2. Requirements\n\nThe code has been developed and tested for iPhone OS 3.0 and higher. It does not use anything specific to 3.0 so it should also work on 2.2.1.\n\nTo use this code you will need to sign up for Twitter API access and then open a support ticket with them to request XAuth access.\n\nh2. Example Usage\n\nA full working example is included in the project. The gist of it is here:\n\n\u003cpre\u003e\u003ccode\u003e\n\n@interface TestViewController : UIViewController \u003cTwitterLoginViewControllerDelegate,TweetComposeViewControllerDelegate\u003e {\n  @private\n\tTwitterConsumer* _consumer;\n\tTwitterToken* _token;\n}\n\n- (IBAction) share;\n\n@end\n\n@implementation TestViewController\n\n- (void) viewDidLoad\n{\n\t// Replace the key and secret with your own\n\n\t_consumer = [[TwitterConsumer alloc] initWithKey: @\"KEY\" secret: @\"SECRET\"];\n   \n\t// Try to get the token from the keychain. If it does not exist then we will have to show the login dialog\n\t// first. In a real application you should store the token in the user's keychain!\n\t\n\tNSData* tokenData = [[NSUserDefaults standardUserDefaults] dataForKey: @\"Token\"];\n\tif (tokenData != nil)\n\t{\n\t\t_token = (TwitterToken*) [[NSKeyedUnarchiver unarchiveObjectWithData: tokenData] retain];\n\t}\n}\n\n- (void) openTweetComposer\n{\n\tTweetComposeViewController* tweetComposeViewController = [[TweetComposeViewController new] autorelease];\n\tif (tweetComposeViewController != nil)\n\t{\n\t\ttweetComposeViewController.consumer = _consumer;\n\t\ttweetComposeViewController.token = _token;\n\t\ttweetComposeViewController.message = @\"I like Cheese\";\n\t\ttweetComposeViewController.delegate = self;\n\n\t\tUINavigationController* navigationController = [[[UINavigationController alloc] initWithRootViewController: tweetComposeViewController] autorelease];\n\t\tif (navigationController != nil) {\n\t\t\t[self presentModalViewController: navigationController animated: YES];\n\t\t}\n\t}\n}\n\n- (IBAction) share\n{\n\tif (_token == nil)\n\t{\n\t\tTwitterLoginViewController* twitterLoginViewController = [[TwitterLoginViewController new] autorelease];\n\t\tif (twitterLoginViewController != nil)\n\t\t{\n\t\t\ttwitterLoginViewController.consumer = _consumer;\n\t\t\ttwitterLoginViewController.delegate = self;\n\n\t\t\tUINavigationController* navigationController = [[[UINavigationController alloc] initWithRootViewController: twitterLoginViewController] autorelease];\n\t\t\tif (navigationController != nil) {\n\t\t\t\t[self presentModalViewController: navigationController animated: YES];\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\t[self openTweetComposer];\n\t}\n}\n\n#pragma mark -\n\n- (void) twitterLoginViewControllerDidCancel: (TwitterLoginViewController*) twitterLoginViewController\n{\n\t[twitterLoginViewController dismissModalViewControllerAnimated: YES];\n}\n\n- (void) twitterLoginViewController: (TwitterLoginViewController*) twitterLoginViewController didSucceedWithToken: (TwitterToken*) token\n{\n\t_token = [token retain];\n\n\t// Save the token to the user defaults\n\n\t[[NSUserDefaults standardUserDefaults] setObject: [NSKeyedArchiver archivedDataWithRootObject: _token] forKey: @\"Token\"];\n\t[[NSUserDefaults standardUserDefaults] synchronize];\n\t\n\t// Open the tweet composer and dismiss the login screen\n\n\tTweetComposeViewController* tweetComposeViewController = [[TweetComposeViewController new] autorelease];\n\tif (tweetComposeViewController != nil)\n\t{\n\t\ttweetComposeViewController.consumer = _consumer;\n\t\ttweetComposeViewController.token = _token;\n\t\ttweetComposeViewController.message = @\"I like Cheese\";\n\t\ttweetComposeViewController.delegate = self;\n\t\t\n\t\t[twitterLoginViewController.navigationController pushViewController: tweetComposeViewController animated: YES];\n\t}\n}\n\n- (void) twitterLoginViewController: (TwitterLoginViewController*) twitterLoginViewController didFailWithError: (NSError*) error\n{\n\tNSLog(@\"twitterLoginViewController: %@ didFailWithError: %@\", self, error);\n}\n\n#pragma mark -\n\n- (void) tweetComposeViewControllerDidCancel: (TweetComposeViewController*) tweetComposeViewController\n{\n\t[tweetComposeViewController dismissModalViewControllerAnimated: YES];\n}\n\n- (void) tweetComposeViewControllerDidSucceed: (TweetComposeViewController*) tweetComposeViewController\n{\n\t[tweetComposeViewController dismissModalViewControllerAnimated: YES];\n}\n\n- (void) tweetComposeViewController: (TweetComposeViewController*) tweetComposeViewController didFailWithError: (NSError*) error\n{\n\t[tweetComposeViewController dismissModalViewControllerAnimated: YES];\n}\n\n#pragma mark -\n\n- (void) dealloc\n{\n\t[_consumer release];\n\t[_token release];\n\t[super dealloc];\n}\n\n@end\n\u003c/code\u003e\u003c/pre\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fst3fan%2Fiphone-twitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fst3fan%2Fiphone-twitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fst3fan%2Fiphone-twitter/lists"}