Find Jobs
Hire Freelancers

Instagram Basic Display API hook using PHP

$10-30 USD

Cerrado
Publicado hace más de 3 años

$10-30 USD

Pagado a la entrega
Expand on my Instagram Basic Display API hook, using PHP, to check if token is close to expiring and fetch/store new token so it never 'expires'. I am using Processwire's API but the set up is fairly standard. // Instagram init $instagramHttp = new WireHttp(); $instagramAccessToken = "???"; $instagramFields = "username,id,media_type,media_url,caption,tags,timestamp"; $instagramBase = "[login to view URL]$instagramFields&access_token=$instagramAccessToken"; // [login to view URL]$instagramAccessToken // Instagram feed wire()->addHookMethod('Page::instagramFeed', function($event) use($instagramHttp, $instagramBase) { $page = $event->object; // Get cache only if it's less than or equal to 30 minutes (1800 seconds) $result = wire('cache')->get('instagramFeed', 1800); if (!$result) { $result = $instagramHttp->getJSON($instagramBase); wire('cache')->save('instagramFeed', $result, 1800); // 30 minutes } $event->return = $result; }); Deliverables Block of code that I can use to fetch an Instagram feed and store the access token and check if the token has expired.
ID del proyecto: 27888003

Información sobre el proyecto

1 propuesta
Proyecto remoto
Activo hace 3 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos

Sobre este cliente

Bandera de UNITED STATES
Santa Clara, United States
0,0
0
Miembro desde oct 24, 2020

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.