Skip to content

Instantly share code, notes, and snippets.

@mortenjohs
Created December 28, 2013 11:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mortenjohs/8158552 to your computer and use it in GitHub Desktop.
Save mortenjohs/8158552 to your computer and use it in GitHub Desktop.
def unfollow id, access_token
host = 'api.instagram.com'
path = "/v1/users/#{id}/relationship?access_token=#{access_token}"
request = HTTPI::Request.new
request.url = "https://#{host}#{path}"
request.body = { action: "unfollow"}
HTTPI.post(request)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment