php - Twitter share link not working -


i want tweeter share button work tweets work showing image, title , description. have given twitter cards it's not working , don't understand why. g+ working , having issues twitter , facebook share.

my anchor tag twitter share below

<a class="fa fa-twitter" href="https://twitter.com/intent/tweet?status=<?php echo base_url(); ?>index.php/testimonials/fb_share/<?php echo $row->client_id; ?>" target="_blank"><i class="icomoon-icon-twitter"></i><span class="share-title"></span></a> 

i tried url in place of status still no luck

 <a class="fa fa-twitter" href="https://twitter.com/intent/tweet?url=<?php echo base_url(); ?>index.php/testimonials/fb_share/<?php echo $row->client_id; ?>" target="_blank"><i class="icomoon-icon-twitter"></i><span class="share-title"></span></a> 

my twitter cards below

  <!-- twitter card data --> <meta name="twitter:card" content="summary"> <meta name="twitter:site" content="http://quanutrition.com/dotcom/new/"> <meta name="twitter:title" content="<?php echo $res['name'];?>"> <meta name="twitter:description" content="<?php echo $res['content1'];?>"> <meta name="twitter:creator" content="@author_handle"> <meta name="twitter:image" content="http://quanutrition.com/dotcom/new//admin/assets/uploads/clients_image/<?php echo $res['image'];?>"> <!-- twitter summary card large image must @ least 280x150px --> <meta name="twitter:image:src" content="http://quanutrition.com/dotcom/new//admin/assets/uploads/clients_image/<?php echo $res['image'];?>"> 

the $res variable looks particular client_id

array ( [client_id] => 1 [name] => shikhar dhawan [image] => shikhar-dhawan-759.jpg [video] => [content1] => "nutrition plays key role in recovery , performance. using sports gene testing , advance nutritional blood biochemistry helps me. eating plan gets more scientific , result oriented way."

now not understanding why twitter cards not working. did g+ in exact same manner , worked perfectly. can suggest how solve this?

first of all, must ensure meta tags available in final static output url sharing.

in case of 1 example testimonial page http://quanutrition.com/dotcom/new/index.php/testimonials/fb_share/4 see this:

<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:site" content="http://quanutrition.com/dotcom/new/"> <meta name="twitter:title" content="s. danush"> <meta name="twitter:description" content=""qua nutrition has helped me grow physically, sports-wise in healthy manner , explore strength through right nutrition. thank vibrant coach mr.veerabadran, showed me way qua nutrition , thank nutritionist suhasini dedicated support , guidance in helping me achieve dream. systematic approach of dietitians , minuscule study of body elements strengths of qua. wish every athlete gets opportunity visit qua nutrition , best out of them!" "> <meta name="twitter:creator" content="@author_handle"> <!-- twitter summary card large image must @ least 280x150px --> <meta name="twitter:image:src" content="http://quanutrition.com/dotcom/new//admin/assets/uploads/clients_image/danushs.jpg">

the twitter:description tag broken because has double quotation mark on either side of value content.

the twitter:creator tag generic.

the twitter:image:src tag name should twitter:image. in cards documentation.

testing links in twitter card validator results in: error: failed fetch page due to: dnsresolutionrequesttimeout

this because either host blocking twitter's ip addresses, or there slow dns resolution (5+ seconds) domain.

there's troubleshooting advice on twitter's developer forums , documentation site.


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -