Android Instagram Connector

Additional

Language
Java
Version
v1.3.2 (Dec 3, 2017)
Created
Sep 26, 2016
Updated
Dec 3, 2017 (Retired)
Owner
Marco Cattaneo (mcatta)
Contributors
Marco Cattaneo (mcatta)
Vishnu Haridas (vishnuharidas)
2
Activity
Badge
Generate
Download
Source code

Android Instagram Connector

Android Instagram Connector: use Instagram API

How Use

Edit your build.gradle file with:

dependencies {
    compile 'eu.marcocattaneo.androidinstagramconnector:android-instagram-connector:1.3.2'
}

Example:

Instagram instagram = Instagram.newInstance(this, "<CLIENT_ID>", "<CLIENT_SECRET>", "http://callback");
instagram.getSession(new InstagramListener() {
    @Override
    public void onConnect(InstagramSession session) {
        session.execute("/users/self", new RequestCallback() {
            @Override
            public void onResponse(int resultCode, @Nullable String body) {
                // body = json response
            }
        });
    }

    @Override
    public void onError(ConnectionError error) {

    }
});

Authorization scope:

To manage login permission, for more detail .

Instagram instagram = Instagram.newInstance(this, "<CLIENT_ID>", "<CLIENT_SECRET>", "http://callback");
instagram.addScopes(new HashSet<Scope>() {{
    add(Scope.BASIC);
    add(Scope.PUBLIC);
    add(Scope.FOLLOWER);
}});
...

Extra:

To logout you can invoke logout() method on the InstagramSession.

LICENSE

Copyright 2016 Marco Cattaneo

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.