Back to project page aInstagram.
The source code is released under:
GNU General Public License
If you think the Android project aInstagram listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package net.jackbeasley.aInstagram; //from w w w .ja v a 2s .c om import android.content.Context; import org.jinstagram.auth.InstagramAuthService; import org.jinstagram.auth.model.Token; import org.jinstagram.auth.oauth.InstagramService; /** * Created by Jack on 11/10/2014. */ public class SignIn implements Runnable{ private String apiKey; private String apiSecret; private String callbackURL; private static final Token EMPTY_TOKEN = null; private Context context; /** * * @param apiKey * @param apiSecret * @param callbackURL */ public SignIn(String apiKey, String apiSecret, String callbackURL, Context context){ setApiKey(apiKey); setApiSecret(apiSecret); setCallbackURL(callbackURL); } public void setApiKey(String apiKey){ this.apiKey = apiKey; } public void setApiSecret(String apiSecret){ this.apiSecret = apiSecret; } public void setCallbackURL(String callbackURL){ this.callbackURL = callbackURL; } /** * Starts executing the active part of the class' code. This method is * called when a thread is started that has been created with a class which * implements {@code Runnable}. */ @Override public void run() { InstagramService authService = new InstagramAuthService() .apiKey(apiKey) .apiSecret(apiSecret) .callback(callbackURL) .build(); String authorizationUrl = authService.getAuthorizationUrl(EMPTY_TOKEN); } }