getTweet(String tweetId) mediaUrl has no value
Closed this issue · 10 comments
I posted a tweet with a video at https://twitter.com/
I use getTweet(String tweetId), but mediaUrl has no value in the media object
"media": [
{
"type": "video",
"height": 544,
"width": 960,
"url": null,
"end": -1,
"start": -1,
"mediaUrl": null,
"displayUrl": null,
"expandedUrl": null,
"id": -1,
"media_key": "7_1572885207459454980",
"duration_ms": 8473,
"preview_image_url": "https://pbs.twimg.com/ext_tw_video_thumb/1572885207459454980/pu/img/T6C3S214J9B4PJGG.jpg",
"public_metrics": {
"view_count": 4
},
"alt_text": null
}
],
Unfortunately this is not library bug. In Twitter V2 api there no url video in response. I am also waiting this feature from twitter
Unfortunately this is not library bug. In Twitter V2 api there no url video in response. I am also waiting this feature from twitter
one way
Add the variants to request parameter media.fields. You can get variants array. It has multiple display or playback variants, with different resolutions or formats.
media.fields : duration_ms,height,media_key,preview_image_url,public_metrics,type,url,width,alt_text,variants
{
"includes": {
"media": [
{
"height": 544,
"public_metrics": {
"view_count": 6
},
"media_key": "7_1572885207459454980",
"variants": [
{
"content_type": "application/x-mpegURL",
"url": "https://video.twimg.com/ext_tw_video/1572885207459454980/pu/pl/pbQWsEUXkw8ox3eV.m3u8?tag=12&container=fmp4"
},
{
"bit_rate": 2176000,
"content_type": "video/mp4",
"url": "https://video.twimg.com/ext_tw_video/1572885207459454980/pu/vid/960x544/DZ-3fUJBZ_WBYzs1.mp4?tag=12"
},
{
"bit_rate": 256000,
"content_type": "video/mp4",
"url": "https://video.twimg.com/ext_tw_video/1572885207459454980/pu/vid/476x270/4fqJCPyq5vWw9d5j.mp4?tag=12"
},
{
"bit_rate": 832000,
"content_type": "video/mp4",
"url": "https://video.twimg.com/ext_tw_video/1572885207459454980/pu/vid/634x360/QCk1u73hoHMr-YjB.mp4?tag=12"
}
],
"duration_ms": 8473,
"type": "video",
"preview_image_url": "https://pbs.twimg.com/ext_tw_video_thumb/1572885207459454980/pu/img/T6C3S214J9B4PJGG.jpg",
"width": 960
}
],
Nice. this is what i need also. i will implement NOW
Nice. this is what i need also. i will implement NOW
Yes! come on!
I will wait for you to release the latest version
Done, now waiting for release)
Yes we'll make a new release this month. I would like to wait for the new DM endpoint at the end of October.
Stay tuned :)
If it's a quote from someone else's tweet the media image of the source tweet also doesn't have a url value @redouane59 @blizniukov
Yes we'll make a new release this month. I would like to wait for the new DM endpoint at the end of October. Stay tuned :)
I have been waiting for this version, our app needs to use it
I'll make a release now if you need it quickly, it's ok ;)
I'll make a release now if you need it quickly, it's ok ;)
Oh great!