From 6b707e147505211a678d9181ee2d1cd374ca4e58 Mon Sep 17 00:00:00 2001 From: AvarageCodeEnjoyer <111468739+AvarageCodeEnjoyer@users.noreply.github.com> Date: Sat, 10 Feb 2024 15:51:33 -0700 Subject: [PATCH] Update index.js --- index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index 395e0b0..d257525 100644 --- a/index.js +++ b/index.js @@ -4,10 +4,10 @@ async function getData() { const results = await fetch(`https://graph.instagram.com/me/media?fields=media_url,caption,timestamp,media_type,permalink&access_token=${accessToken}`) const result = await results.json() - document.getElementById("id").innerHTML += result.data[postNumber].id - document.getElementById("caption").innerHTML += result.data[postNumber].caption - document.getElementById("mediaType").innerHTML += result.data[postNumber].media_type - document.getElementById("timestamp").innerHTML += result.data[postNumber].timestamp - document.getElementById("permalink").innerHTML += result.data[postNumber].permalink + document.getElementById("id").innerHTML = result.data[postNumber].id + document.getElementById("caption").innerHTML = result.data[postNumber].caption + document.getElementById("mediaType").innerHTML = result.data[postNumber].media_type + document.getElementById("timestamp").innerHTML = result.data[postNumber].timestamp + document.getElementById("permalink").innerHTML = result.data[postNumber].permalink document.getElementById('image').setAttribute("src", result.data[postNumber].media_url) -} \ No newline at end of file +}