{"id":1890,"url":"https://github.com/natesymer/FHSTwitterEngine","last_synced_at":"2025-08-02T05:32:57.667Z","repository":{"id":4407405,"uuid":"5544809","full_name":"natesymer/FHSTwitterEngine","owner":"natesymer","description":"Twitter API for Cocoa developers","archived":false,"fork":false,"pushed_at":"2017-02-21T15:58:56.000Z","size":1103,"stargazers_count":213,"open_issues_count":9,"forks_count":77,"subscribers_count":20,"default_branch":"master","last_synced_at":"2024-05-22T19:14:06.492Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/natesymer.png","metadata":{"files":{"readme":"README.markdown","changelog":"changelog.markdown","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-08-24T19:27:54.000Z","updated_at":"2022-07-08T13:14:15.000Z","dependencies_parsed_at":"2022-08-26T17:51:51.307Z","dependency_job_id":null,"html_url":"https://github.com/natesymer/FHSTwitterEngine","commit_stats":null,"previous_names":["fhsjaagshs/fhstwitterengine"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natesymer%2FFHSTwitterEngine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natesymer%2FFHSTwitterEngine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natesymer%2FFHSTwitterEngine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natesymer%2FFHSTwitterEngine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/natesymer","download_url":"https://codeload.github.com/natesymer/FHSTwitterEngine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227489234,"owners_count":17780529,"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-01-05T20:15:58.280Z","updated_at":"2024-12-06T09:30:28.156Z","avatar_url":"https://github.com/natesymer.png","language":"Objective-C","readme":"FHSTwitterEngine\n================\n\n***Twitter API for Cocoa developers***\n\nCreated by [Nathaniel Symer](mailto:nate@natesymer.com)\n\n`FHSTwitterEngine` can:\n\n- Authenticate using OAuth and/or xAuth.\n- Make a request to just about every API endpoint.\n\nWhy you should use `FHSTwitterEngine`:\n\n- Single .h/.m pair\n- No dependencies\n- Shared instance\n- Scientific\n\nThis project started with [OAuthConsumer](.github/oauthconsumer.md).\n\n## Setup\n\n### [CocoaPods](https://cocoapods.org/)\n\n```ruby\npod 'FHSTwitterEngine', '~\u003e 2.0'\n```\n\n### Manual\n\n1. Add `FHSTwitterEngine.h` and `FHSTwitterEngine.m` to your project\n- Link against `SystemConfiguration.framework`\n- Enable ARC for both files if applicable\n\n## Usage\n\n\u003e Add import where necessary\n\n\t#import \"FHSTwitterEngine.h\"\n\n\u003e Set up `FHSTwitterEngine`\n\n    [[FHSTwitterEngine sharedEngine]permanentlySetConsumerKey:@\"\u003cconsumer_key\u003e\" andSecret:@\"\u003cconsumer_secret\u003e\"];\n\u003e Or with a temporary consumer that gets cleared after each request\n\n    [[FHSTwitterEngine sharedEngine]temporarilySetConsumerKey:@\"\u003cconsumer_key\u003e\" andSecret:@\"\u003cconsumer_secret\u003e\"];\n\n\u003e Set access token delegate (see [header](FHSTwitterEngine/FHSTwitterEngine.h))\n\n    [[FHSTwitterEngine sharedEngine]setDelegate:myDelegate];\n\n\u003e Login via OAuth:\n\n    UIViewController *loginController = [[FHSTwitterEngine sharedEngine]loginControllerWithCompletionHandler:^(BOOL success) {\n        NSLog(success?@\"L0L success\":@\"O noes!!! Loggen faylur!!!\");\n    }];\n    [self presentViewController:loginController animated:YES completion:nil];\n\n\u003e Login via XAuth:\n\n    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{\n    \t@autoreleasepool {\n    \t\tNSError *error = [[FHSTwitterEngine sharedEngine]getXAuthAccessTokenForUsername:@\"\u003cusername\u003e\" password:@\"\u003cpassword\u003e\"];\n        \t// Handle error\n        \tdispatch_sync(dispatch_get_main_queue(), ^{\n    \t\t\t@autoreleasepool {\n        \t\t\t// Update UI\n        \t\t}\n       \t\t});\n    \t}\n    });\n\n\u003e Clear the current consumer key\n\n\t[[FHSTwitterEngine sharedEngine]clearConsumer];\n\n\u003e Load a saved access_token (called when API calls are made):\n\n    [[FHSTwitterEngine sharedEngine]loadAccessToken];\n\n\u003e Clear your access token:\n\n    [[FHSTwitterEngine sharedEngine]clearAccessToken];\n\n\u003e Check if a session is valid:\n\n    [[FHSTwitterEngine sharedEngine]isAuthorized];\n\n\u003e Do an API call (POST and GET):\n\n    dispatch_async((dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{\n    \t@autoreleasepool {\n    \t\tid twitterData = [[FHSTwitterEngine sharedEngine]postTweet:@\"Hi!\"];\n    \t\t// Handle twitterData (see \"About GET Requests\")\n    \t\tdispatch_sync(dispatch_get_main_queue(), ^{\n    \t\t\t@autoreleasepool {\n        \t\t\t// Update UI\n        \t\t}\n       \t\t});\n    \t}\n    });\n\n## The \"Singleton\" Pattern\n\nThe singleton pattern allows the programmer to use the library across scopes without having to manually keep a reference to the `FHSTwitterEngine` object. When the app is killed, any memory used by `FHSTwitterEngine` is freed.\n\n## Threading\n\nWhile you can use any threading technology for threading, I recommend [Grand Central Dispatch (GCD)](https://developer.apple.com/library/ios/documentation/Performance/Reference/GCD_libdispatch_Ref/).\n\n## General Comments\n\n`FHSTwitterEngine` will attempt to preemptively detect errors in your requests, before they are actually sent. This includes missing parameters, and a lack of authorization. If `FHSTwitterEngine` detects that a user is not logged in, it will attempt to load an access token using its delegate. This process is designed to prevent bad requests from being needlessly sent.\n\n## About requests\n\nMost methods return `id`. The returned object can be a(n):\n\n- `NSMutableDictionary`\n- `NSMutableArray`\n- `UIImage`\n- `NSString`\n- `NSError`\n- `nil`\n\n## Contact\n\n- Open an [issue](https://github.com/fhsjaagshs/FHSTwitterEngine/issues)\n- [Daniel Khamsing](https://twitter.com/dkhamsing)\n- [Nathaniel Symer](mailto:nate@natesymer.com)\n","funding_links":[],"categories":["SDK"],"sub_categories":["Unofficial","Other free courses"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatesymer%2FFHSTwitterEngine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatesymer%2FFHSTwitterEngine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatesymer%2FFHSTwitterEngine/lists"}