Git Product home page Git Product logo

instagram-api-for-google-sheets's Introduction

ISC licensed

Instagram API for Google Sheets

A Google Sheets Add-on for working with Instagram data. This app provides functions for accessing all public Instagram API endpoints (GET operations only). See the Instagram developer documentation for details.

The source code is in ECMAScript 2015, which must be transpiled with Babel to work as a Google Apps Script. Original source and transpiled code are both provided in this repository. Developed using the [node-google-apps-script] (https://www.npmjs.com/package/node-google-apps-script) npm package. Source code is documented following JSDoc conventions.

In order to run this code yourself, you will need to do the following:

  • Create a new standalone Google Apps Script project.
  • Create a new project in the Google Developers Console.
  • Associate the project with your script (Resources: Developers Console Project).
  • Activate the Drive API in the Developers Console.
  • Activate the Drive API in your script (Resources: Advanced Google Services).
  • Include the OAuth2 for Apps Script library in your script project (Resources: Libraries).
  • Register as a developer with Instagram if you haven't already.
  • Register a new client with Instagram for using the API with your script.
  • Set the Redirect URI in your client to "https://script.google.com/macros/d/{ID}/usercallback" where ID is not the project key in either your project properties or your script's URL (even though it's supposed to be), but is whatever value is included in the respective URL returned by the getRedirectUri() method of the OAuth2 object created by the getInstagramService() function. You will have to use console logging to figure this out. This is an open issue with Apps Script, so there's unfortunately no way around it.
  • Create two script properties, CLIENT_ID and CLIENT_SECRET, in your project (File: Project properties) and set them to the appropriate values generated for your Instagram client. Note that Instagram does not require the client secret as part of the authentication process, but the Google OAuth2 library will not work without it. C'est la vie.
  • Paste the transpiled ES5 code into your script file or upload it using node-google-apps-script (see above).
  • Test the application as an Add-on (Publish: Test as add-on).

Note that on June 1, Instagram changed its API and now requires apps to undergo review before they can access most data. Until an app is approved, it operates in Sandbox mode and can only access the data of a limited set of invited users. Unfortunately, that severely limits the usefulness of this code as is, but you may be able to incorporate it into a more ambitious project that is capable of meeting Instagram's requirements for going live. Good luck with that.

instagram-api-for-google-sheets's People

Contributors

sjsyrek avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.