Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

231
Views
Cómo obtener datos específicos de la API con Axios y React

ingrese la descripción de la imagen aquí

Quiero obtener una publicación con texto específico en el título de la API gráfica de Instagram. Por ejemplo, si el título de la imagen tiene la palabra "sí" en Instagram, entonces debe mostrarse en la página de inicio

 import React,{useState} from 'react' import axios from 'axios'; import ReactDOM from "react-dom"; export default class Deneme extends React.Component { constructor(props) { super(props); this.state = { loading: true, data: [] }; } getData() { const PostsURL = "https://graph.instagram.com/me/media?fields=id,caption,media_url,permalink,username&access_token=IG...."; axios.get(PostsURL).then((res) => { const data = res.data.data; console.log(data) this.setState({ data: data.filter(data => ['yes'].includes(data.caption)), loading: false, }); }); } async componentDidMount() { this.getData(); } render() { if (this.state.loading) { return <div className='loadingDiv'>Calling the API, one moment please!</div>; } const filterData = this.state.data.filter(d => ['yes'].includes(d.caption) ) return ( <div className="container"> {filterData.map((d) => ( <div className="playerDiv" key={d.id}> {d.username} - {d.caption} </div> ))} </div> ); } }

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!