Find Jobs
Hire Freelancers

Instagram Basic Display API hook using PHP

$10-30 USD

Chiuso
Pubblicato più di 3 anni fa

$10-30 USD

Pagato al completamento
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.
Rif. progetto: 27888003

Info sul progetto

1 proposta
Progetto a distanza
Attivo 3 anni fa

Hai voglia di guadagnare un po'?

I vantaggi delle offerte su Freelancer

Imposta il tuo budget e le scadenze
Fatti pagare per il lavoro svolto
Delinea la tua proposta
La registrazione e le offerte sui lavori sono gratuite

Info sul cliente

Bandiera: UNITED STATES
Santa Clara, United States
0,0
0
Membro dal ott 24, 2020

Verifica del cliente

Grazie! Ti abbiamo inviato tramite email il link per richiedere il tuo bonus gratuito.
Non è stato possibile inviarti l'email. Riprova per piacere.
di utenti registrati di lavori pubblicati
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Caricamento anteprima
Autorizzazione per la geolocalizzazione concessa.
La tua sessione è scaduta ed è stato effettuato il log out. Accedi nuovamente per piacere.