RE: RE: Farcaster开发指南
You are viewing a single comment's thread from:

RE: Farcaster开发指南

Words
16
Reading
1 min
Listen
Play
8M

利用API查询用户fid,得到用户的帖子。

async function fetchCasts(){
  const response = await fetch(
    'https://snapchain-api.neynar.com/v1/castsByFid?fid=748646&reverse=true',
    {
        headers: {
          'Content-Type': 'application/json',
          'Accept': 'application/json',
          'x-api-key': 'D8E0xxxxx',
        },
        method: "GET",
    }
  )
  const result = await response.json()
}
fetchCasts()