I'm coding a web app who have to count followers for a tiktok account. I took an API on github who have some functions who can help me and i found this : https://github.com/szdc/tiktok-api
I use the .listFollowers and i stock it in an array, later, i will just count all of entries.
Actually i'm beginner in web development and in Typescript.
...
const api = new TikTokAPI(params, { signURL });
var id = '';
// You are now able to make successful requests api.listFollowers({user_id: id,max_time: Math.floor(new Date().getTime() / 1000),count: null}) .then(res => console.log(res.data.followers)) .catch(console.log);
followers at the line 10 is underline in red. The error who result is "The 'followers' property does not exist on the 'BaseResponseData | ListFollowersResponse' type. The 'followers' property does not exist on the 'BaseResponseData' type. ts(2339)"
Sorry for my English, i'm french, french are not good in english you know !
Thanks for your helping !
Aucun commentaire:
Enregistrer un commentaire