Skip to content

Instantly share code, notes, and snippets.

@beaugunderson
Created January 12, 2013 03:34
Show Gist options
  • Select an option

  • Save beaugunderson/4515909 to your computer and use it in GitHub Desktop.

Select an option

Save beaugunderson/4515909 to your computer and use it in GitHub Desktop.
#!/bin/bash
TOKEN=""
API_URL="https://api.instagram.com/v1"
PHOTO_ID="358863216058600582_3832082"
function get_liked() {
http GET "$API_URL/media/$PHOTO_ID?access_token=$TOKEN" | jsonpipe | grep user_has_liked
}
get_liked
http POST "$API_URL/media/$PHOTO_ID/likes?access_token=$TOKEN"
get_liked
http DELETE "$API_URL/media/$PHOTO_ID/likes?access_token=$TOKEN"
get_liked
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment