Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
function fetchInsta() {
var lat = ;
var long = ;
var apikey = ;
var url = ""+lat+"&lng="+long+"&distance=400&access_token="+apikey+"&count=100";
var result = UrlFetchApp.fetch(url);
var json = JSON.parse(result.getContentText());
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
var existingids = sheet.getDataRange().getValues();
for(i in{
var match = false;
for(j in existingids){
if([i].id === existingids[j][3].toString()){
var match = true;
if(match != true){
var image =[i].images.standard_resolution.url;
var username =[i].user.username;
var link =[i].link;
var imageid =[i].id;
var date =[i].created_time;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.