Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

igm

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

igm

  • 1.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

IGM

You can use this library to implement Instagram login in your Ruby application.

We use this at Chicisimo.

Usage

require "sinatra"
require "igm"

REDIRECT_URI = "https://something.com/login/instagram/token"

IGM.configure do |config|
  config.client_id     = "xxx"
  config.client_secret = "xxx"
end

get "/login/instagram" do
  redirect to(IGM.authorize_uri(redirect_uri: REDIRECT_URI, scope: %w{basic}))
end

get "/login/instagram/token" do
  code = params[:code]

  access_token = IGM.get_access_token(redirect_uri: REDIRECT_URI, code: code) # => "51116472.c3144az.2s1ce1c0074u4918aad3454263e4fe6c"

  user = IGM.get_user_info(access_token) # => {:username=>"pedrotgimenez", :bio=>"autodidact. I write software at @chicisimo.", :website=>"https://twitter.com/pedrotgimenez", :profile_picture=>"https://igcdn-photos-d-a.akamaihd.net/hphotos-ak-xap1/t51.2885-19/11191353_1624249301122731_1724880273_a.jpg", :full_name=>"Pedro Giménez", :counts=>{:media=>65, :followed_by=>1, :follows=>1}, :id=>"xxxx"}
end

FAQs

Package last updated on 10 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc