Spring Social Instagram Plugin

  • Tags: spring-social, instagram
  • Latest: 0.1
  • Last Updated: 15 August 2013
  • Grails version: 2.0 > *
0 vote
Dependency:
compile ":spring-social-instagram:0.1"
Custom repositories:
mavenRepo "http://maven.springframework.org/milestone/"
mavenRepo "http://maven.springframework.org/release/"
mavenRepo "http://maven.springframework.org/snapshot/"
mavenRepo "http://maven.springframework.org/milestone/"

 Documentation  Source  Issues

Summary

Uses Instagram via Spring Social API.

Installation

grails install-plugin spring-social-instagram

Description

Required properties in Config.groovy:

instagram.clientId = "client_id"

instagram.clientSecret = "client_secret"

After this properties are configured you can use 'instagram' providerId in your app with spring social core to connect user Instagram account. After this all operations you got permissions for are available through InstagramTemplate.

Examples

Signin through Instagram:

<g:form method="POST" mapping="springSocialSignIn" params="[providerId: 'instagram']">
    <g:hiddenField name="scope" value="basic comments relationships likes"/>
    <g:submitButton name="connectInstagram" value="Sign in with Instagram"/>
  </g:form>

Get Media files from Instagram account:

InstagramTemplate instagramTemplate = new InstagramTemplate(grailsApplication.config.instagram.clientId, userConnection.accessToken)
PagedMediaList result = instagramTemplate.userOperations().getRecentMedia(instagramConnection.providerUserId as Long)