api.getFriendsList() is working but when code run api.listen() returning error :
TypeError: Cannot read properties of undefined (reading 'successful_results')
This is full message error :
C:\laragon\www\learnbotnodejs\instagrambotsu\node_modules\ts-messenger-api\dist\lib\api.js:189
if (resData[resData.length - 1].successful_results === 0) {
^
TypeError: Cannot read properties of undefined (reading 'successful_results')
at Api. (C:\laragon\www\learnbotnodejs\instagrambotsu\node_modules\ts-messenger-api\dist\lib\api.js:189:77)
at step (C:\laragon\www\learnbotnodejs\instagrambotsu\node_modules\ts-messenger-api\dist\lib\api.js:52:23)
at Object.next (C:\laragon\www\learnbotnodejs\instagrambotsu\node_modules\ts-messenger-api\dist\lib\api.js:33:53)
at C:\laragon\www\learnbotnodejs\instagrambotsu\node_modules\ts-messenger-api\dist\lib\api.js:27:71
at new Promise ()
at __awaiter (C:\laragon\www\learnbotnodejs\instagrambotsu\node_modules\ts-messenger-api\dist\lib\api.js:23:12)
at C:\laragon\www\learnbotnodejs\instagrambotsu\node_modules\ts-messenger-api\dist\lib\api.js:182:67
at processTicksAndRejections (node:internal/process/task_queues:96:5)
This is my code : `const api = await facebookLogin({ email: facebookEmail, password: facebookPassword });
api.getFriendsList() is working but when code run api.listen() returning error :
TypeError: Cannot read properties of undefined (reading 'successful_results')
This is full message error : C:\laragon\www\learnbotnodejs\instagrambotsu\node_modules\ts-messenger-api\dist\lib\api.js:189 if (resData[resData.length - 1].successful_results === 0) { ^
TypeError: Cannot read properties of undefined (reading 'successful_results') at Api. (C:\laragon\www\learnbotnodejs\instagrambotsu\node_modules\ts-messenger-api\dist\lib\api.js:189:77)
at step (C:\laragon\www\learnbotnodejs\instagrambotsu\node_modules\ts-messenger-api\dist\lib\api.js:52:23)
at Object.next (C:\laragon\www\learnbotnodejs\instagrambotsu\node_modules\ts-messenger-api\dist\lib\api.js:33:53)
at C:\laragon\www\learnbotnodejs\instagrambotsu\node_modules\ts-messenger-api\dist\lib\api.js:27:71
at new Promise ()
at __awaiter (C:\laragon\www\learnbotnodejs\instagrambotsu\node_modules\ts-messenger-api\dist\lib\api.js:23:12)
at C:\laragon\www\learnbotnodejs\instagrambotsu\node_modules\ts-messenger-api\dist\lib\api.js:182:67
at processTicksAndRejections (node:internal/process/task_queues:96:5)