Problem with Twitter Cards / Meta tags


#1

Hi,

I have implemented the OpenGraph and Twitter meta tags on our website and the validator confirming that it should work. (the domain is approved).
I have a custom tweet button on my page with a link to:

https://twitter.com/intent/tweet?url=http://www.setours.com?imageUrl=%2Fpublic%2Fimages%2Fdiscover%2Fperu%2Fthumbs%2Fper_.jpg&description=Chachapoyas%20en%20route%20to%20Kuelap%20mountains%20-%20Setours

(i am using PHP to manipulate the image and description parameters)

This just tweets the link instead of the Twitter Card.

This are my meta data tags:

<!-- Twitter meta tags -->
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Setours - Handcrafted Journeys">
<meta name="twitter:description" content="<?php echo $params['description']; ?>"/>
<meta name="twitter:image:src" content="http://www.setours.com<?php echo $params['imageUrl']; ?>"/>

Anyone who can point me in the right direction ? Would greatly be appreciated !


#2

That intent URL is incorrect. The description is taken as a parameter for the intent, not for you site. The URL tweeted has no description and an image card without description is invalid.
Your URL should be:
https://twitter.com/intent/tweet?url=http://www.setours.com?imageUrl=%2Fpublic%2Fimages%2Fdiscover%2Fperu%2Fthumbs%2Fper_.jpg%26description=Chachapoyas%20en%20route%20to%20Kuelap%20mountains%20-%20Setours
(the ampersand before description should be %26, and the %20 in the description should be %2520 or %2b – meaning a pass of URL escaping is missing)


#3

I have also same problem please someone help me


#4

Hi @vincentisambart,

Thanks for your input, got it working now.
One more question, now if someone follows the link “View on web” they get redirected to:

is there anyway to influence this ?

I url should look like this:


#5

The “View on web” link is always the same as the link in the tweet.