ftert
#1
Hey,
the link I’m validating with https://cards-dev.twitter.com/validator is this:
http://thisisfootball.esquiretv.com/#/video/dlyyHVoGaYKE0kMTKdtnQ2eANEbRv5O84XXJeZV1
‘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 = "https://thisisfootball.esquiretv.com/assets/uploaded/" + token + "/final.mp4";
document.write("<meta name=\"twitter:player\" content=\"https://thisisfootball.esquiretv.com/container.html?token=" + token + "\"/>");
document.write("<meta name=\"twitter:player:stream\" content=\"" + videoUrl + "\"/>");
}
</script>
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.
ftert
#3
Thanks for the quick reply! That’s what I was afraid to hear 