Automate twitter cards

I am trying to use twitter card with large images on my site
twitter cards

according to twitter cards you need to manually input title and description for the image you want to tweet
zazzle uses this on product page
like here http://www.zazzle.com/cute_dog_keychain-146236809167312948
so when you tweet from the product page , a preview of product is attached to tweet

however the card requires you to input meta description and tags title e.t.c manually for it to work
but zazzle is using some dynamic kind of code which auto pulls titles
basically something like this
http://stackoverflow.com/questions/11061724/how-do-i-automate-twitter-cards
I am trying this on my site here on the page http://www.weddingpaperlove.com/product.php which dynamically pulls results (title, images and description) http://www.weddingpaperlove.com/boho_chic_watercolor_foliage_wedding_postage_zazzle_stamp-172955632209191697.html

which is same as this (when youc lick "buy now) it takes you to following link)
http://www.zazzle.com/boho_chic_watercolor_foliage_wedding_postage-172955632209191697

(my site is a display place for my zazzle products)

but it does not render preview because

so can anyone help me with automating twitter card with some code related ot my site?

I know it is confusing but if anyone can help?
Much Much appreciated

How is the site made? Is it a CMS, is it database driven or hand written?
Generally on a database driven site you would pull that info from the database for each page and render all the meta tags you need. You would likely duplicate the ordinary title and description meta tags for the Twitter and OG ones. But I notice from you code that you do not even have ordinary title and description tags, nor does the page even have a <head> element. You should be fixing that first of all.

2 Likes

I can see the head element now… I have attached an image with my Twitter Card Meta tags, this site uses Wordpress and Yoast which makes things easier but you should be able to generate your own code on Twitter…

Hi, I know how and what to put in meta tags, but I wanted to automate it
like not enter title and description for every page but instead it automatically pulls title and description for the image Ii tweet, I know it is possible as zazzle is doing it already, I just don;t know how :confused:

quite difficult to explain it is this setup
http://www.paperdinosaur.com/zsbb/
was created by zazzle to display your zazzle store products on your own website

So where are you storing the title and description?

this should help @MGGM82, if the correct code is placed in the head section of your website then you should not need to enter anything manually, it should be automatic… good luck

https://dev.twitter.com/cards/getting-started

I am not, this page http://www.weddingpaperlove.com/product.php automatically pulls title and description
when you click any product from the page suppose from here
http://www.weddingpaperlove.com/fall-save-the-date-cards.php?gridPage=1_2&gridSort=&keywords=fall
I click any product the product.php page is rendered as
http://www.weddingpaperlove.com/fall_autumn_brown_leaves_save_the_date_card_zazzle_card-137097350531542304.html
when you click share for pinterest or twitter it shows title and description fine, but when you try to use twitter card it is not validated as for twitter card to work
you must manually enter title and description for the image you want preview to be included of, but since this page is dynamic I cannot do that…

no, it is not working, I get this error on validator page

http://www.weddingpaperlove.com/barnwood_rustic_fall_leaves_mason_jars_save_dates_postcard_zazzle_postcard-239521535463272942.html

"INFO: Page fetched successfully
INFO: 6 metatags were found
INFO: twitter:card = summary_large_image tag found
ERROR: Invalid value (message: Field description failed to validate because: text expects tag property, but not found in Map().)
ERROR: Invalid value (message: Field title failed to validate because: text expects tag property, but not found in Map().)"

which brings me back to my question

From where?

So where are you expecting this information to come from?

The page has text in the <h1>, that would do for the title.

fall autumn brown leaves save the date card

There is not much in the way of text for a description, the best I can see is:-

stylish, chic, fall wedding design

There is an image so you have that covered.

But how is this content put onto the page? I presume some type of database.
The same process that pulls this info to fill the page content could be used to populate the meta tags.

this is the only code I use to pull products from my zazzle store
<?php // configure Zazzle Store Builder display with the following $_GET variables // Overrides values in include/configuration.php $_GET['contributorHandle'] = "blessedwedding"; $_GET['keywords']="lace"; $_GET['productLineId']="196758887636205068"; $_GET['defaultSort'] = 'date_created'; $_GET['showHowMany'] = "30"; $_GET['productsPerRow'] = "5"; $_GET['showProductDescription'] = "false"; $_GET['useShortDescription'] = "true"; // Load Zazzle Store Builder include "/home/users/web/b1526/ipg.mgdezignscom/weddingpaperlove/include/zstore.php"; ?>

basically this
http://www.weddingpaperlove.com/rustic_fall_leaves_save_the_date_magnetic_card_zazzle_magneticinvitation-256477537699636975.html
is a display page of this
http://www.zazzle.com/rustic_fall_leaves_save_the_date_magnetic_card-256477537699636975

the only difference is that the first one is on my site so when i tweet from there it takes people clicking in it to my site instead of directly to my store

and the display set up is this one
http://www.paperdinosaur.com/zsbb/ it was created by ex zazzle ngineer for zazzle store owners
all we do is upload files and then just enter the code to nay page and it pulls products from zazzle website

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