{"id":13428634,"url":"https://github.com/AnderGoig/InstagramLogin","last_synced_at":"2025-03-16T01:32:51.777Z","repository":{"id":56914920,"uuid":"102912440","full_name":"AnderGoig/InstagramLogin","owner":"AnderGoig","description":"Simple way to authenticate Instagram accounts on iOS.","archived":true,"fork":false,"pushed_at":"2018-04-03T15:22:27.000Z","size":33777,"stargazers_count":71,"open_issues_count":2,"forks_count":19,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-09-20T10:02:13.179Z","etag":null,"topics":["authentication","carthage","cocoapods","instagram","instagram-api","instagram-authentication","ios","social-login","swift","xcode"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/AnderGoig.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-09-08T23:26:37.000Z","updated_at":"2024-08-16T01:32:37.000Z","dependencies_parsed_at":"2022-08-21T03:50:28.555Z","dependency_job_id":null,"html_url":"https://github.com/AnderGoig/InstagramLogin","commit_stats":null,"previous_names":["andergoig/igauth"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnderGoig%2FInstagramLogin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnderGoig%2FInstagramLogin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnderGoig%2FInstagramLogin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnderGoig%2FInstagramLogin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AnderGoig","download_url":"https://codeload.github.com/AnderGoig/InstagramLogin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814905,"owners_count":20352037,"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":["authentication","carthage","cocoapods","instagram","instagram-api","instagram-authentication","ios","social-login","swift","xcode"],"created_at":"2024-07-31T01:01:02.015Z","updated_at":"2025-03-16T01:32:50.961Z","avatar_url":"https://github.com/AnderGoig.png","language":"Swift","funding_links":[],"categories":["Authentication","Libs","Authentication [🔝](#readme)"],"sub_categories":["Other free courses","Authentication","Getting Started"],"readme":"# InstagramLogin\n\n[![CI Status](http://img.shields.io/travis/AnderGoig/InstagramLogin.svg?style=flat)](https://travis-ci.org/AnderGoig/InstagramLogin)\n[![License](https://img.shields.io/cocoapods/l/InstagramLogin.svg?style=flat)](http://cocoapods.org/pods/InstagramLogin)\n[![Platform](https://img.shields.io/cocoapods/p/InstagramLogin.svg?style=flat)](http://cocoapods.org/pods/InstagramLogin)\n[![Version](https://img.shields.io/cocoapods/v/InstagramLogin.svg?style=flat)](http://cocoapods.org/pods/InstagramLogin)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![codebeat badge](https://codebeat.co/badges/973c1f62-6fc3-42bd-ae51-013d38cb6da7)](https://codebeat.co/projects/github-com-andergoig-instagramlogin-master)\n\n\u003e InstagramLogin allows iOS developers to authenticate users by their Instagram accounts.\n\n`InstagramLogin` handles all the **Instagram authentication** process by showing a custom `UIViewController` with the login page and returning an access token that can be used to [request data from Instagram](https://www.instagram.com/developer/endpoints/).\n\nInspired by projects like [InstagramAuthViewController](https://github.com/Isuru-Nanayakkara/InstagramAuthViewController) and [InstagramSimpleOAuth](https://github.com/rbaumbach/InstagramSimpleOAuth), because of the need for a **simple** and **easy** way to authenticate Instagram users.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/AnderGoig/InstagramLogin/master/.assets/InstagramLogin-Demo.gif\"\n         alt=\"InstagramLogin Demo (GIF)\" width=\"375\" height=\"667\"\u003e\n\u003c/p\u003e\n\n## Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\nSecond, go to your Instagram's [developer portal](https://www.instagram.com/developer/clients/manage/), click on _Manage_ your client, and **uncheck** the option \"**Disable implicit OAuth**\" from the _Security_ tab.\n\nThird, edit the `Constants.swift` file with your client info from Instagram's [developer portal](https://www.instagram.com/developer/clients/manage/):\n\n```swift\nstatic let clientId = \"\u003cYOUR CLIENT ID GOES HERE\u003e\"\nstatic let redirectUri = \"\u003cYOUR REDIRECT URI GOES HERE\u003e\"\n```\n\nFourth, go ahead and test it! :rocket:\n\n## Requirements\n\n* iOS 9.0+\n* Xcode 9.0+\n* Swift 4.0+\n\n## Installation\n\n### CocoaPods\n\n`InstagramLogin` is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your `Podfile`:\n\n```ruby\npod 'InstagramLogin'\n```\n\n### Carthage\n\n[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.\n\nTo integrate `InstagramLogin` into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```ogdl\ngithub \"AnderGoig/InstagramLogin\"\n```\n\nFollow the detailed guidelines [here](https://github.com/Carthage/Carthage#if-youre-building-for-ios-tvos-or-watchos).\n\n### Manual installation\n\nSimply copy all the Swift files from the [InstagramLogin/Classes](InstagramLogin/Classes) folder into your Xcode project.\n\n## Usage\n\nFirst of all, go to your Instagram's [developer portal](https://www.instagram.com/developer/clients/manage/), click on _Manage_ your client, and **uncheck** the option \"**Disable implicit OAuth**\" from the _Security_ tab.\n\n```swift\nimport InstagramLogin // \u003c-- VERY IMPORTANT! ;)\n\nclass YourViewController: UIViewController {\n\n    var instagramLogin: InstagramLoginViewController!\n\n    // 1. Set your client info from Instagram's developer portal (https://www.instagram.com/developer/clients/manage)\n    let clientId = \"\u003cYOUR CLIENT ID GOES HERE\u003e\"\n    let redirectUri = \"\u003cYOUR REDIRECT URI GOES HERE\u003e\"\n\n    func loginWithInstagram() {\n\n        // 2. Initialize your 'InstagramLoginViewController' and set your 'ViewController' to delegate it\n        instagramLogin = InstagramLoginViewController(clientId: clientId, redirectUri: redirectUri)\n        instagramLogin.delegate = self\n\n        // 3. Customize it\n        instagramLogin.scopes = [.basic, .publicContent] // [.basic] by default; [.all] to set all permissions\n        instagramLogin.title = \"Instagram\" // If you don't specify it, the website title will be showed\n        instagramLogin.progressViewTintColor = .blue // #E1306C by default\n\n        // If you want a .stop (or other) UIBarButtonItem on the left of the view controller\n        instagramLogin.navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .stop, target: self, action: #selector(dismissLoginViewController))\n\n        // You could also add a refresh UIBarButtonItem on the right\n        instagramLogin.navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .refresh, target: self, action: #selector(refreshPage))\n\n        // 4. Present it inside a UINavigationController (for example)\n        present(UINavigationController(rootViewController: instagramLogin), animated: true)\n    }\n\n    @objc func dismissLoginViewController() {\n        instagramLogin.dismiss(animated: true)\n    }\n\n    @objc func refreshPage() {\n        instagramLogin.reloadPage()\n    }\n\n    // ...\n}\n\n// MARK: - InstagramLoginViewControllerDelegate\n\nextension YourViewController: InstagramLoginViewControllerDelegate {\n\n    func instagramLoginDidFinish(accessToken: String?, error: InstagramError?) {\n\n        // Whatever you want to do ...\n\n        // And don't forget to dismiss the 'InstagramLoginViewController'\n        instagramLogin.dismiss(animated: true)\n    }\n}\n```\n\n## Contributing to this project\n\nIf you have feature requests or bug reports, feel free to help out by sending pull requests or by [creating new issues](https://github.com/AnderGoig/InstagramLogin/issues/new). Please take a moment to\nreview the guidelines written by [Nicolas Gallagher](https://github.com/necolas):\n\n* [Bug reports](https://github.com/necolas/issue-guidelines/blob/master/CONTRIBUTING.md#bugs)\n* [Feature requests](https://github.com/necolas/issue-guidelines/blob/master/CONTRIBUTING.md#features)\n* [Pull requests](https://github.com/necolas/issue-guidelines/blob/master/CONTRIBUTING.md#pull-requests)\n\n## License\n\n`InstagramLogin` is available under the MIT license. See the [LICENSE](LICENSE) file for more info.\n\n## Credits\n\n`InstagramLogin` is brought to you by [Ander Goig](https://github.com/AnderGoig) and [contributors to the project](https://github.com/AnderGoig/InstagramLogin/contributors). If you're using `InstagramLogin` in your project, attribution would be very appreciated.\n\n## Author\n\nAnder Goig, [goig.ander@gmail.com](mailto:goig.ander@gmail.com)\n\n[https://github.com/AnderGoig/InstagramLogin](https://github.com/AnderGoig/InstagramLogin)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAnderGoig%2FInstagramLogin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAnderGoig%2FInstagramLogin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAnderGoig%2FInstagramLogin/lists"}