skip to Main Content

TypeError: Cannot read property 'hasOwnProperty' of undefined – Twitter API V2 vs. GAS

Twitter API: https://developer.twitter.com/en/docs/twitter-api/tweets/timelines/introduction In theory, when there is no data, it should leave the value as empty. As seen in this part of the script: if ( obj_data.data[int_i].entities.hasOwnProperty("urls") && Array.isArray(obj_data.data[int_i].entities.urls) && obj_data.data[int_i].entities.urls[0].expanded_url != undefined ) { array_Expanded_url.push([obj_data.data[int_i].entities.urls[0].expanded_url]); } else {…

VIEW QUESTION
Back To Top
Search