You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I'm trying to fetch Tweets and copy the text and media so that users can easily repost the Tweet (with attribution) in order to add alt text to images.
I've figured out how to get the text and other tweet attributes, including media, but the media is only showing me the media keys which are absolutely not useful to me.
Here's the curl request that was suggested by the Twitter v2 API calls tool:
Both in the server console.log and in the response json object sent back to the client, it was an object like this:
{
attachments: {
media_keys: [
"3_<Tweet ID>"
]
}
id: "<Tweet ID>"
text: "<Tweet text> <URL, presumably referring to the image, but that does not lead to anything>"
}
Is there a way to get the attachment urls? I also tried other media.fields and none of them worked. Is there no implementation of media.fields in this or am I just doing something wrong?
(note, in case it wasn't clear by there being a media key returned, there is an image in the Tweet I looked up)
The text was updated successfully, but these errors were encountered:
So I'm trying to fetch Tweets and copy the text and media so that users can easily repost the Tweet (with attribution) in order to add alt text to images.
I've figured out how to get the text and other tweet attributes, including media, but the media is only showing me the media keys which are absolutely not useful to me.
Here's the curl request that was suggested by the Twitter v2 API calls tool:
So I took that and did this in the client:
and this in the server:
Both in the server
console.log
and in the response json object sent back to the client, it was an object like this:Is there a way to get the attachment urls? I also tried other media.fields and none of them worked. Is there no implementation of media.fields in this or am I just doing something wrong?
(note, in case it wasn't clear by there being a media key returned, there is an image in the Tweet I looked up)
The text was updated successfully, but these errors were encountered: