Card validator says 'twitter:player' tag is missing



the link I’m validating with is this:

‘Twitter:player’ tag is in place, but I still get the error:
INFO: Page fetched successfully
INFO: 18 metatags were found
INFO: twitter:card = player tag found
ERROR: Required meta tag missing (twitter:player)
Action taken: opened link

Please, help!

   <script type="text/javascript">
        if (window.location.href.contains("video")) {
            var token = window.location.href.split("/").pop();
            var videoUrl = "" + token + "/final.mp4";
            document.write("<meta name=\"twitter:player\" content=\"" + token + "\"/>");
            document.write("<meta name=\"twitter:player:stream\" content=\"" + videoUrl + "\"/>");

Unfortunately because you’re using dynamic code like this, the Twitterbot will never see the twitter:player tag (there’s no window.location in the case of the server-side bot). You’ll need to render the tags on your server side and serve up a complete page.


Thanks for the quick reply! That’s what I was afraid to hear :slight_smile: