What is the correct way to "Tweet the URL" - intent not working


#1

I am trying to create a Tweet link in my application so that it correctly uses cards.

My card is validated and looks great in the validation tool - all my open graph tags are working as-expected.

However, when I actually open the “https://twitter.com/intent/tweet?url=” URL from my application, it looks terrible, and no card actually shows up in the final tweet.

Here’s the card in the validation tool (looks great):

…and here’s what actually shows up (doesn’t actually work):

Clearly, there is a right way and a wrong way to “Tweet the URL”, but no one seems to want to share exactly what the right way is… not even Twitter. This is how Twitter explains how to “Tweet the URL”:

“After testing in the validator or approval of your Player Card, Tweet the URL and see the Card appear below your tweet in the details view.” (from https://dev.twitter.com/cards/overview)

…that’s it, just “Tweet the URL” – no example, no code, no nothing, just “Tweet the URL” – well, I tried “Tweeting the URL” and that doesn’t work.

Here’s how I am trying to build the tweet URL from C#:

public void SocialTwitter() { string friendlyName = State.gameBoardName.Substring(3); string url = "https://twitter.com/intent/tweet?url=" + WWW.EscapeURL("http://52.2.157.99/boards/twitter_card.php?yard=" + State.gameBoardName + "&seeds=" + ActorGameManager.GetScore(ActorGameManager.seedsPlanted) + "&yardfriendly=" + friendlyName.Substring(0, 1).ToUpper() + friendlyName.Substring(1).ToLower()) ; Application.OpenURL(url); }

What am I doing wrong?

More Attempts: I even tried this with a simple static HTML page, and it’s still not working - this is what the tweet looks like:


#2

You’ll need to use a fully-qualified DNS name rather than an IP address for Cards to work. In retrospect, the Cards validator should be update to reflect that, but that isn’t a top priority for us. Apologies for the confusion here.


#3

Thank you, Andy.