Post url tweet

urls

#1

Hello,

I integrated fabric sdk in my Android application, I was able to upload medias using twitter rest api, but I have a question regarding tweeting an url. I’m using StatusesService and method update to post a url, what I noticed is that not all the time the video preview thumbnail is displayed. Can someone help me with this problem? Or how can I show the thubmnail myself? I tried before this uploading an image, and update the tweet with that mediaId, but when I click the image it will not open my link. Can someone help me how can I show video preview every time?

Thank you.


#2

If you’re posting a URL, then a preview will only be shown in the Tweet or timeline if the URL itself has Twitter Cards markup. Are you able to provide example links that don’t work for you?


#3

Hi andypiper and thanks for reply.

Yes for example this link:
https://yizoot.com/listing/1285/testt/
I just forgot to mention that I have to post url automatically, without UI help.

Thanks again.


#4

With Twitter Kit then you should be using the Tweet Composer to share the Tweets and provide the user the opportunity to edit the text. You should not be posting without the user’s consent as this is against the developer policy.

I just tried to validate the card at your URL and see a DNS timeout as the site is not responding within 5 seconds. That’s probably why no card is rendering in the Tweet.


#5

Hi,
I know\read about the developer policy and I’m asking every time for user permission in order to post automatically.
What I notice is that for this link “https://yizoot.com/listing/1355/” with card validator I got the below error:
"ERROR: Invalid value (message: Field title failed to validate because: text expects tag property, but not found in Map().)"
Question: The card preview is not displayed if the url doesn’t contains any text?

Thank you in advance.


#6

Correct, if twitter:title is blank then the card cannot be generated.


#7

Cool,
Thank you for your great support Andy!