Instagram node

This is my attempt on the Instagram node. Current example is showing the query node. Comments are welcome. I'll squash commits once we get this work into a pullable state. Thanks

The pull request is now ready @knolleary .
I was offering the option of having something in the path that actually
resembles what the given service calls the OAuth callback. This however
means that the callback URL will be different in some nodes. In order to
match them up, we could add a "callback" tag to all these express functions.

I'm considering that the different name (matching the service's on naming
convention) is for the user's convenience as in the instagram case, it's
called a "rediredt url" and if the user sees "redirect" in the URL, they're
more confident that they're copying the right field into the right place.

Mark says that as long as the instructions are clear, it doesn't matter
what the callback uri is and he'd therefore leave it as callback. I would
do the option I sketched up above.

Thanks

On 3 October 2014 12:05, knolleary <notifications@github.com> wrote:

> In instagram/instagram.js:
>
> > +        res.redirect(Url.format({
> > +            protocol: 'https',
> > +            hostname: 'api.instagram.com',
> > +            pathname: '/oauth/authorize/',
> > +            query: {
> > +                client_id: credentials.client_id,
> > +                redirect_uri: credentials.redirect_uri,
> > +                response_type: "code",
> > +                state: node_id + ":" + credentials.csrfToken
> > +            }
> > +        }));
> > +
> > +        RED.nodes.addCredentials(node_id,credentials);
> > +    });
> > +
> > +    RED.httpAdmin.get('/instagram-credentials/auth/redirect', function(req, res) {
>
> What do you mean by 'tag the function'? As has been said, the urls were
> picked based on what oauth calls them. I don't see a compelling reason for
> this node to do something different.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/node-red/node-red-web-nodes/pull/27/files#r18389821>.
>