addAltText(to_text_) - daneden/Twift GitHub Wiki
addAltText(to:text:)
Allows the user to provide alt text for the mediaId
. This feature is currently only supported for images and GIFs.
@available(*, deprecated, message: "Media methods currently depend on OAuth 1.0a authentication, which will be deprecated in a future version of Twift. These media methods may be removed or replaced in the future.")
public func addAltText(to mediaId: Media.ID, text: String)
Usage:
- Upload media using the
upload(mediaData)
method - Add alt text to the
mediaId
returned from step 1 via this method - Create a Tweet with the
mediaId
Parameters
- mediaId: The target media to attach alt text to
- text: The alt text to attach to the
mediaId