Reputation: 69
When I try to get the tweet (status) using this API endpoint https://api.twitter.com/1.1/statuses/show.json?id= the entities object which have urls does not provide me the link posted with the status, in the urls object there is only the tweet url itself.
example https://twitter.com/i/web/status/1148391479490043910
in this status there is an attached url
the shortest one is
I need to get this url mentioned above in the urls subobject of entities object
Does anyone face this issue?
Upvotes: 0
Views: 305
Reputation: 69
after a ton of searches and tries, I got the reason
the issue was because of the truncate issue of the tweet itself, so when request twitter API, must add 'tweet_mode=extended' to the request and everything work perfectly !
Upvotes: 0
Reputation: 3148
The long url is in thejson.entities.urls[0].expanded_url
The short one is in thejson.entities.urls[0].url
Upvotes: 1