Using:
SwiftLinkPreview 3.3.0
Xcode 12.4
Example:
If you provide https://twitter.com/joshdholtz/status/1359219485543182337?s=20 as text to SwiftLinkPreview's preview(text:onSuccess:onFailure) method it responds in the success block with
Response(url: Optional(https://twitter.com/joshdholtz/status/1359219485543182337?s=20), finalUrl: Optional(https://twitter.com/joshdholtz/status/1359219485543182337?s=20), canonicalUrl: Optional("twitter.com"), title: nil, description: Optional("We’ve detected that JavaScript is disabled in this browser. Please enable JavaScript or switch to a supported browser to continue using twitter.com. You can see a list of supported browsers in our Help Center."), images: Optional(["https://abs.twimg.com/errors/logo46x38.png"]), image: Optional("https://abs.twimg.com/errors/logo46x38.png"), icon: Optional("https://abs.twimg.com/responsive-web/client-web-legacy/icon-ios.b1fc7275.png"), video: nil, price: nil)
The title is nil, and the images are generic Twitter icons not related to the Tweet.
Using:
SwiftLinkPreview 3.3.0
Xcode 12.4
Example:
If you provide
https://twitter.com/joshdholtz/status/1359219485543182337?s=20as text to SwiftLinkPreview'spreview(text:onSuccess:onFailure)method it responds in the success block withResponse(url: Optional(https://twitter.com/joshdholtz/status/1359219485543182337?s=20), finalUrl: Optional(https://twitter.com/joshdholtz/status/1359219485543182337?s=20), canonicalUrl: Optional("twitter.com"), title: nil, description: Optional("We’ve detected that JavaScript is disabled in this browser. Please enable JavaScript or switch to a supported browser to continue using twitter.com. You can see a list of supported browsers in our Help Center."), images: Optional(["https://abs.twimg.com/errors/logo46x38.png"]), image: Optional("https://abs.twimg.com/errors/logo46x38.png"), icon: Optional("https://abs.twimg.com/responsive-web/client-web-legacy/icon-ios.b1fc7275.png"), video: nil, price: nil)The title is nil, and the images are generic Twitter icons not related to the Tweet.