Twitter Card generation via using an API to post on behalf of a user?


Description of issue:
I couldn’t find any documentation of this throughout the web but is there a way to get the Twitter Card to show up if a user posts using Twitters API? Currently, if I just tweet out this link then I’ll get what I’m looking for - a card shows up! However, if I tweet using our CMS system to automate the tweet out it instead just has the link but no Twitter Card associated with it.

URL affected (must be public):
The URL is this:

Troubleshooting steps attempted [note that we will not prioritise posts unless there is evidence of following the troubleshooting guides]:
I know that the whitelisted issues aren’t persistent with this because I’ve had posts go through just fine if I Tweet directly through Twitter. However, when I setup the Tweet and then run it through the API that generates the message, when I check Twitter the message is the same as what I would tweet but just with the URL and no Twitter Card associated with it. If you look at the link and look at the you’ll see it has all the appropriate tags to generate the twitter card.

If you go to my Twitter here:

You’ll see that there are a few posts of the card and some without the card. Generally speaking, the ones with the card were manually entered whereas the ones without were via the API. Just to cover another base, I have used the validation tool and it generates the card BEFORE I send out the post. I’ll also go to the article just to make sure everything is in place with the tags and content, check the validation tool, and then send out the tweet. However, it still just has the link and no Twitter Card generation.

For those who look at the article names I did test it via HTTPS/HTTP and currently it’s running on HTTP and not HTTPS. Currently, our testing server does not have a valid cert. Initially, I thought that was the problem until I tried the validation tool and manually entering in the tweet with success.

Thank you in advance for anyone that helps!


I’ve figured it out - thanks for anyone that took the time to read through this. I’ve noticed that the latest tweet has the HTTPS:// when it should have been HTTP://. It was something in the code on our end which wasn’t checking the protocol correctly and was always setting everything to HTTPS instead of HTTP when it was supposed to be.

closed #3

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.