├── .gitignore ├── README.md ├── android-instagram-oauth-example ├── AndroidManifest.xml ├── default.properties ├── res │ ├── drawable │ │ └── icon.png │ ├── layout │ │ └── main.xml │ └── values │ │ └── strings.xml └── src │ └── br │ └── com │ └── dina │ └── oauth │ └── instagram │ └── example │ ├── ApplicationData.java │ └── MainActivity.java └── android-instagram-oauth ├── AndroidManifest.xml ├── default.properties ├── res ├── drawable │ └── icon.png ├── layout │ └── main.xml └── values │ └── strings.xml └── src └── br └── com └── dina └── oauth └── instagram ├── InstagramApp.java ├── InstagramDialog.java ├── InstagramSession.java └── Main.java /.gitignore: -------------------------------------------------------------------------------- 1 | .classpath 2 | .project 3 | .settings 4 | bin 5 | gen 6 | target 7 | 8 | local.properties 9 | build.xml 10 | proguard.cfg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Android OAuth Library for Instagram Applications 2 | --------------- 3 | 4 | ![GitHub](http://thiago.grem.io/img/github/ig.png "GitHub") 5 | ![GitHub](http://thiago.grem.io/img/github/ig_oauth2.png "GitHub") 6 | ![GitHub](http://thiago.grem.io/img/github/ig_oauth3.png "GitHub") 7 | 8 | ## Usage 9 | 10 | You can create an utility class where you can define your application credentials, like the one below: 11 | 12 | public class ApplicationData { 13 | public static final String CLIENT_ID = ""; 14 | public static final String CLIENT_SECRET = ""; 15 | public static final String CALLBACK_URL = ""; 16 | } 17 | 18 | To instantiage the main class for the oauth flow, you need to follow the code below: 19 | 20 | InstagramApp mApp; = new InstagramApp(this, 21 | ApplicationData.CLIENT_ID, 22 | ApplicationData.CLIENT_SECRET, 23 | ApplicationData.CALLBACK_URL); 24 | 25 | Once you have the main class ready for the authorization, you can start the authorization flow by calling the following method: 26 | 27 | mApp.authorize(); 28 | 29 | If you token is expired, you can call this method to refresh it: 30 | 31 | mApp.refreshToken(); 32 | 33 | To get the account list, call the following method 34 | 35 | mApp.getAccountList(); 36 | 37 | ## Contributions 38 | 39 | Any contribution to this project is welcome, feel free to fork and create pull requests 40 | 41 | ## Other Android Libraries 42 | 43 | Use these libraries also to get the best for your android application 44 | 45 | * [Android ActionBar](https://github.com/johannilsson/android-actionbar) by [Johan Nilsson](https://github.com/johannilsson) 46 | * [Android Pull to Refresh](https://github.com/johannilsson/android-pulltorefresh) by [Johan Nilsson](https://github.com/johannilsson) 47 | * [SwipeView](https://github.com/fry15/uk.co.jasonfry.android.tools) by [Jason Fry](https://github.com/fry15) 48 | * [Facebook Integration](https://github.com/lorensiuswlt/AndroidFacebook) by [Lorensius](https://github.com/lorensiuswlt) 49 | * [Twitter Integration](https://github.com/lorensiuswlt/AndroidTwitter) by [Lorensius](https://github.com/lorensiuswlt) 50 | * [Quick Actions](https://github.com/lorensiuswlt/NewQuickAction) by [Lorensius](https://github.com/lorensiuswlt) -------------------------------------------------------------------------------- /android-instagram-oauth-example/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /android-instagram-oauth-example/default.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system use, 7 | # "build.properties", and override values to adapt the script to your 8 | # project structure. 9 | 10 | # Project target. 11 | target=android-7 12 | android.library.reference.1=../android-instagram-oauth 13 | -------------------------------------------------------------------------------- /android-instagram-oauth-example/res/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thiagolocatelli/android-instagram-oauth/fc9a698f263b3014fee2dcce1e86df005f5d52d9/android-instagram-oauth-example/res/drawable/icon.png -------------------------------------------------------------------------------- /android-instagram-oauth-example/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 |