Can't get the media entities of some tweets even with tweet_mode=extended

android
twitterkit

#1

Hello everyone
I don’t know why I can’t get the media entities of some tweets
for example this tweet, it contains a video and the profile is public but I can’t get the URL of the video or any of the entities of the tweet:
https://twitter.com/Moh_d_alkhaldi/status/854316996930002945

and here is my Android code :
(I have my AccessToken abject that contains all correct AccessToken data of the user, also I called Twitter.initialize() in my MainActivity onCreate())

String id = "854316996930002945";
TwitterAuthToken token = new TwitterAuthToken (accessToken.getToken(), accessToken.getTokenSecret());
TwitterSession session = new TwitterSession(token, accessToken.getUserId(), accessToken.getScreenName());
TwitterApiClient client = TwitterCore.getInstance().getApiClient(session);
StatusesService statusesService = client.getStatusesService();
Call<Tweet> tweetCall = statusesService.show(Long.parseLong(id), false, false, true);
Response<Tweet> response = tweetCall.execute();
TweetEntities entities = response.body().extendedEntities;
List<UrlEntity> urls = entities.urls;

I get NullPointerException in this line
List<UrlEntity> urls = entities.urls;
which means that entities is null

is there any error in my code?
thank you in advance

UPDATE:
Sorry, after some tests I found that the error is in this line:
TweetEntities entities = response.body().extendedEntities;
which means that response.body() throws the NullPointerException
but why? what’s wrong?
Note: I tested the response object, it’s not null


#2

I’ve responded on the other thread where you posted this question.