Plugins You can find out about all the publicly available Grails plugins.

Spring Social Instagram Plugin

0 vote
compile "org.grails.plugins:spring-social-instagram:0.1"
Custom repositories:
mavenRepo ""
mavenRepo ""
mavenRepo ""
mavenRepo ""

 Documentation  Source  Issues


Uses Instagram via Spring Social API.


grails install-plugin spring-social-instagram


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.


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"/>

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)