Hi, folks!
Problem:
The video below is displayed correctly on Twitter site, via tweet deck etc.
twitter.com/PGATOUR/status/1475481604902502404
But when I’m trying to get these tweets programmatically using the api v1.1 I received only images in media.
The response (extended_entities) contains media section with only “type”: “photo” and do not include media with the video type. So video_info data is missing.
I use the following API request:
api.twitter.com/1.1/statuses/show?id=1475481604902502404
I used API v1.1 through the nodejs twitter clien v1.7.1
I have tested using Postman and got the same results.
In addition I tried to use the tweet_mode: extended but without results.
Can anyone explain to me
- what is wrong with video of these tweets ?
- How can I get the video information using api ?
Wrong tweets ids: 1475481604902502404, 1480699144729546755, 1481405127563087877
Thanks!
1 Like
Some tweets created as Twitter Ads have video “cards” that you can’t access unless you’re the account owner. I haven’t checked any of your examples if that was the case though.
1 Like
Have you read the docs carefully, I just got the result like screenshot
the point you are missing is the expansion parameter.
1 Like
oh sorry i used v2 endpoint to get that, haven’t tried for v1
2 Likes
Done, no problem with endpoint v1.1
Screenshot
maybe you are using v2 endpoint instead of v1.1, without setting expansion
sky3d
#6
Hi!
I suggest you are wrong. On you screenshot you got the information about the preview image not video with links.
Try to test the same request for other video tweet with id=1468946837407215622
Don’t forget to add tweet_mode: extended parameter and review the difference.
Please review the expected response
So the problem still reproduced on API v.1.1
Thanks
1 Like
oh yeah nice, thanks for correcting 
2 Likes
Thanks for your reply. Would you please let me know, how can I check if my examples are created as Twitter Ads? Which field is added if Tweet is created as Twitter Ads Tweet?
Using GET statuses/show/:id | Docs | Twitter Developer Platform a d setting include_card_uri=true will be one way.
Thanks!
I checked and found that this solution unfortunately did not solve the issue with my example.
The main question I don’t understand is why I am getting an image instead of a video. I can’t figure out why I’m getting an image link instead of a video link for this tweet:
https://twitter.com/PGATOUR/status/1475481604902502404
Maybe there are other ideas?
That’s a promoted tweet created in Twitter Media Studio according to the source
2 Likes
try it with another tweet that contains video, which is not a promoted tweet
1 Like
Thanks! So I can’t get data for such tweets? Is promoted tweet it is the same as tweets created as Twitter Ads? I was thinking promoted tweets have special marks the same as tweets created as Twitter Ads. But there are no special marks in my example.
Thanks! Yes, it works for others tweets with video.
1 Like
No, it’s also confusing because not all promoted tweets have a “card” like this, so far the only way I found that reliably identifies tweets like this is with the card_uri and source attributes.
1 Like
system
closed
#16
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.