Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

API example: authentication first & deprecated method fixed

  • Loading branch information...
commit d6cca45d7130d3b9d7edd0912beedd81ba463771 1 parent 4321b76
@5v3n 5v3n authored
Showing with 7 additions and 10 deletions.
  1. +7 −10 README.md
View
17 README.md
@@ -68,6 +68,13 @@ API Usage Examples
------------------
require "rubygems"
require "instagram"
+
+ # All methods require authentication (either by client ID or access token).
+ # To get your Instagram OAuth credentials, register an app at http://instagr.am/oauth/client/register/
+ Instagram.configure do |config|
+ config.client_id = YOUR_CLIENT_KEY
+ config.access_token = YOUR_ACCESS_TOKEN
+ end
# Get a list of a user's most recent media
puts Instagram.user_recent_media(777)
@@ -78,16 +85,6 @@ API Usage Examples
# Get a list of recent media at a given location, in this case, the Instagram office
puts Instagram.location_recent_media(514276)
- # All methods require authentication (either by client ID or access token).
- # To get your Instagram OAuth credentials, register an app at http://instagr.am/oauth/client/register/
- Instagram.configure do |config|
- config.client_id = YOUR_CLIENT_KEY
- config.access_token = YOUR_ACCESS_TOKEN
- end
-
- # Get a list of all the users you're following
- puts Instagram.follows
-
# Get a list of media close to a given latitude and longitude
puts Instagram.media_search("37.7808851","-122.3948632")
Please sign in to comment.
Something went wrong with that request. Please try again.