Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
AvarageCodeEnjoyer authored Feb 10, 2024
1 parent 800cbdc commit 6b707e1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit 6b707e1

Please sign in to comment.