Coder Social home page Coder Social logo

jinstagram's Introduction

#jInstagram Build Status

Flattr this

An unofficial Java library for the Instagram API.

Note : jInstagram uses code from the [scribe-java] (https://github.com/fernandezpablo85/scribe-java) library developed by [Pablo Fernandez] (https://github.com/fernandezpablo85).

##Usage

  • Create the InstagramService object
InstagramService service =	new InstagramAuthService()
    							.apiKey("your_client_id")
    							.apiSecret("your_client_secret")
    							.callback("your_callback_url")     
    							.build();

[With Scope]

Note : Multiple scopes can be provided with a space in between. For ex. .scope("likes comments") Please see Instagram API for more details regarding the supported scopes.

Commenting access - You need to register your clientId and Application Name on http://bit.ly/instacomments, to get access to commenting.

InstagramService service = new InstagramAuthService()
    							.apiKey("your_client_id")
    							.apiSecret("your_client_secret")
    							.callback("your_callback_url") 
    							.scope("comments")
    							.build();

Note : An empty token can be define as follows -

private static final Token EMPTY_TOKEN = null;
  • Validate your user against Instagram
String authorizationUrl = service.getAuthorizationUrl(EMPTY_TOKEN);
  • Getting the Access Token
Verifier verifier = new Verifier("verifier you get from the user");
Token accessToken = service.getAccessToken(EMPTY_TOKEN, verifier);
  • Creating the Instagram Object
Instagram instagram = new Instagram(accessToken);
  • Or Creating the Instagram Object with enforce signed header (Note: Enforce signed header of the APP settings should be checked)
// 1. your_client_secret: do not use accessToken.getSecret(), it may be null.
// 2. your IPs: comma-separated list of one or more IPs.
//    You can use the 127.0.0.1 loopback address during testing.
Instagram instagram = new Instagram(accessToken.getToken(), "your_client_secret", "your_IPs");

###Sample Projects

  • Basic Web Application Source | Demo - A basic web application demonstrating the use of jInstagram API.

##Instagram API Endpoints

Please see the API Usage for more details.

##Instagram Embedding Endpoints

InstagramOembed oembed = new InstagramOembed();
OembedInformation info = oembed.getOembedInformation("http://instagram.com/p/BUG/");

##Maven

<dependency>
   <groupId>com.sachinhandiekar</groupId>
   <artifactId>jInstagram</artifactId>
   <version>1.0.9</version>
</dependency>

##Dependencies

##About me

jinstagram's People

Contributors

arinto avatar damiansoriano avatar didikeke avatar jackjamieson avatar jcrowder avatar jerryrt avatar kawanamiyuu avatar sachin-handiekar avatar santinomazzocchi avatar snicoll avatar stevenschlansker avatar yousefed avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.