mckelvey / instagram-node-lib

The Instagram Node Lib is a helper library for node that makes communicating with the Instagram API easy.
http://david.mckelveycreative.com/
Other
303 stars 49 forks source link

Example for Instagram.subscriptions.handshake #5

Closed sujal closed 12 years ago

sujal commented 12 years ago

Hi there,

This is less of an issue (in the "there's a bug" sense, but I'd like to put together a working example of the Subscription API and am having some trouble understanding the intent of the handshake() method. Basically, your example shows a single callback that contains just the call to handshake.

The problem is that, if I'm reading code & docs correctly, that same endpoint on my node app (/subscribe in your example) is used as the callback for subscription AND for subsequent notifications from instagram.

So, is the idea that that method would actually have more code that would detect fi this is a verification handshake then call handshake() in that case or otherwise process the updates as necessary?

Or am I missing something? I'll happily submit a documentation update if you can clarify what you're going for here. :-)

sujal commented 12 years ago

Ack, never mind. I see what I missed. HTTP method is different on the two scenarios. Sorry about the noise. :)

mckelvey commented 12 years ago

Not a problem @sujal, I’m glad you figured it out. If it could be clearer, let me know or send a pull request. The subscriptions are a bit more complex because of the handshake.

D