When I add a link to a tweet in the TWTweetComposeViewController, I see the link attached correctly:
But unlike when I do so in Safari, the link doesn't show a preview of the URL like Safari (or Youtube) does:
Do you know if it's a hidden feature or if it depends on the Link added to the tweet?
Thank you!
You might not be seeing the Facebook link preview you want because the info has been cached by Facebook. (Facebook saves the info from URLs and pages that have already been shared, for better performance.) So you just may need to force Facebook to clear the cache.
After entering you link in a tweet, Twitter will automatically grab a preview for the link. Once you see the preview, there will be a “X” on the image that if you press will hide your Twitter preview link from being published. What is link preview? A link preview is a visual preview of the content on a website.
Make sure you're on the 'Sharing Debugger' tab, then simply put the address into text field and click the button that says 'Debug'. Head back to your post, refresh the page and type the address in again. Tada! You're Link preview should show up.
Touch and hold a link in Safari to see a preview of the link without opening the page. To open the link, tap the preview, or choose Open.
This has been my experience as well, if you attach a URL the TWTweetComposeViewController will not automatically add a preview image.
I was curious so I took a look at the private runtime headers for Twitter.framework and I found a few interesting methods, including - (BOOL)addURL:(id)arg1 withPreviewImage:(id)arg2;
. Using this in my app I found it worked exactly as expected, the tweet view showed a link along with the image I included. Unfortunately this doesn't help too much, since it's a private method your app will almost certainly be rejected if you try to use it in the App Store.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With