{"id":218,"date":"2024-03-11T14:07:20","date_gmt":"2024-03-11T14:07:20","guid":{"rendered":"https:\/\/treslunasbeautyspa.com\/?page_id=218"},"modified":"2024-03-11T14:11:08","modified_gmt":"2024-03-11T14:11:08","slug":"instagram","status":"publish","type":"page","link":"https:\/\/treslunasbeautyspa.com\/index.php\/instagram\/","title":{"rendered":"Instagram"},"content":{"rendered":"<p><!DOCTYPE html><br \/>\n<html lang=\"es\"><br \/>\n<head><br \/>\n    <meta charset=\"UTF-8\"><br \/>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><br \/>\n    <title>Instagram Feed<\/title><br \/>\n<\/head><br \/>\n<body><br \/>\n    <!-- Agrega este div donde quieras mostrar el feed de Instagram --><\/p>\n<div id=\"instafeed\"><\/div>\n<p><!-- Agrega este script al final del body para cargar el feed de Instagram --><br \/>\n    <script src=\"https:\/\/www.instagram.com\/embed.js\"><\/script><br \/>\n    <script>\n        \/\/ Reemplaza 'username' con tu nombre de usuario de Instagram\n        const username = 'tres_lunas_sanfrancisco_bga';\n        \/\/ Reemplaza 'instafeed' con el ID del div donde quieres mostrar el feed\n        const container = document.getElementById('instafeed');\n        \/\/ Configura el n\u00famero de publicaciones que quieres mostrar\n        const limit = 6;<\/p>\n<p>        \/\/ Carga el feed de Instagram\n        fetch(`https:\/\/www.instagram.com\/${username}\/?__a=1`)\n            .then(response => response.json())\n            .then(data => {\n                const photos = data.graphql.user.edge_owner_to_timeline_media.edges.slice(0, limit);\n                photos.forEach(photo => {\n                    const imageUrl = photo.node.thumbnail_resources[2].src;\n                    const linkUrl = `https:\/\/www.instagram.com\/p\/${photo.node.shortcode}\/`;\n                    container.innerHTML += `<a href=\"${linkUrl}\" target=\"_blank\"><img decoding=\"async\" src=\"${imageUrl}\" alt=\"Instagram Photo\"><\/a>`;\n                });\n            })\n            .catch(error => console.error(error));\n    <\/script><br \/>\n<\/body><br \/>\n<\/html><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Instagram Feed<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-templates\/template-pagebuilder-full-width.php","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"class_list":["post-218","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/treslunasbeautyspa.com\/index.php\/wp-json\/wp\/v2\/pages\/218"}],"collection":[{"href":"https:\/\/treslunasbeautyspa.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/treslunasbeautyspa.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/treslunasbeautyspa.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/treslunasbeautyspa.com\/index.php\/wp-json\/wp\/v2\/comments?post=218"}],"version-history":[{"count":8,"href":"https:\/\/treslunasbeautyspa.com\/index.php\/wp-json\/wp\/v2\/pages\/218\/revisions"}],"predecessor-version":[{"id":227,"href":"https:\/\/treslunasbeautyspa.com\/index.php\/wp-json\/wp\/v2\/pages\/218\/revisions\/227"}],"wp:attachment":[{"href":"https:\/\/treslunasbeautyspa.com\/index.php\/wp-json\/wp\/v2\/media?parent=218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}