Created
March 20, 2013 05:41
-
-
Save michaelrkn/5202571 to your computer and use it in GitHub Desktop.
getting the access token for instagram from the command line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'launchy' | |
CLIENT_ID = 'a3506a51a28b4d639ca680123c43f88d' | |
REDIRECT_URI = 'http://www.epicodus.com/' | |
puts 'To use InstaCommandLine, you need to grant access to the app.' | |
puts 'Press enter to launch your web browser and grant access.' | |
gets | |
Launchy.open "https://instagram.com/oauth/authorize/?client_id=#{CLIENT_ID}&redirect_uri=#{REDIRECT_URI}&response_type=token" | |
puts "Now, copy the text from your address bar here that follows 'access_token=' and press enter:" | |
access_token = gets.chomp | |
Launchy.open "https://api.instagram.com/v1/users/1574083/?access_token=#{access_token}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment