A quick guide on how to setup Node.js development environment.
Previous versions of these install instructions had been tested with:
A quick guide on how to setup Node.js development environment.
Previous versions of these install instructions had been tested with:
You will need the user_id from the user. This is difficult to discover at Instagram but easy from this site http://jelled.com/instagram/lookup-user-id
I used http://jelled.com/instagram/access-token for the next few steps
You will also need an access token which ends up being difficult to obtain. Log into the account and go to their Developer Page.
| // jquery required | |
| // maxWidth and maxHeight can be parameters for more flexibility | |
| function (img_ref) { | |
| var img = $(img_ref); | |
| img.on('load', function () { | |
| img.css("width", "auto"); | |
| img.css("height", "auto"); | |
| /** | |
| * This was a proof of concept for me to be able to | |
| * retrieve an API key using a Netlify environment variable | |
| * using this lambda function. I spent a lot of time looking | |
| * for a complete example like this--without any luck. | |
| * | |
| * So, here's a step-by-step of what I did. | |
| * | |
| * 1) For this function to work, define the env variable in | |
| * Netlify > Site > Build & Deploy > Environment > Edit Variables |
| // Option 1 | |
| // if you know that you only want 2 | |
| let per_page = 100 | |
| let responses = await Promise.all([ | |
| app.$storyapi.get('cdn/stories/', { | |
| starts_with: 'posts/', | |
| per_page: per_page, | |
| page: 1 | |
| }), | |
| app.$storyapi.get('cdn/stories/', { |