Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add support for Headers #118

Open
asimabdul opened this Issue · 5 comments

5 participants

@asimabdul

Implementing something like X-Insta-Forwarded-For requires passing in HTTP headers down to the faraday level. There doesn't seem to be support for this .

@joseramonc

Is there alredy support for this?

@leonko

It seems like you need especially sent to use signed request

https://github.com/Instagram/instagram-ruby-gem/blob/a29c54821a3cde482b8c25971b4cff9e44411247/spec/instagram/request_spec.rb#L21

client.post("/media/123/likes", {}, signature=true)

@leonko

Sorry, by default in new version of client all like and relationship request are signed
https://github.com/Instagram/instagram-ruby-gem/blob/a29c54821a3cde482b8c25971b4cff9e44411247/lib/instagram/client/likes.rb#L37

@cowholio4

Yes there is support already. You can see an example in the tests.

When you create a client include the client_id, client_secret and client_ips along with the access_token. The headers will be set automatically.

client = Instagram::Client.new(:client_id => "CID", :client_secret => @secret, :client_ips => @ips, :access_token => "AT")

https://github.com/Instagram/instagram-ruby-gem/blob/master/spec/instagram/request_spec.rb

@DylanDavidson

It seems this was taken care of by #121, the issue should be closed.
As mentioned above all like and relationship requests are signed by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.