Twitter image preview for player card not showing on app


$defaultEmbedUrl = ‘embed/track/’.$track[‘id’].’-’.toAscii($track[‘title’]);
headerContent .= '<meta name="twitter:player" content="[https://'._SERVER[‘SERVER_NAME’].’/’.$defaultEmbedUrl.’"](https://%27.%24_server[%27server_name%27].%27/’.$defaultEmbedUrl.’%22) />’;
$headerContent .= ‘<meta property=“twitter:player:width” content=“470”/>’;
$headerContent .= ‘<meta property=“twitter:player:height” content=“250”/>’;

$headerContent .= ‘<meta property=“og:title” content="’.$track[‘title’].’"/>’;
$headerContent .= ‘<meta property=“og:url” content="’.$this->model(‘track’)->trackUrl($track).’"/>’;
$headerContent .= ‘<meta property=“og:description” content="’.$track[‘description’].’"/>’;

header.Phtml to this :
<meta property=“og:site_name” content="<?php echo config(‘site-title’)?>">
<meta property=“twitter:site” content="<?php echo url()?>">
// do not include this for track and albums as it’s already included
if (!is_a(getController(), ‘TrackController’) && !is_a(getController(), ‘VideoController’)) {
?><meta property=“twitter:title” content="<?php echo config(‘site-title’)?>">
<meta name=“twitter:card” content=“summary_large_image” />
<meta property=“twitter:description” content="<?php echo $description?>">
<meta property=“twitter:image” content="<?php echo assetUrl(config(‘site_logo’, ‘assets/images/logo.png’))?>">
<meta property=“og:url” content="<?php echo url()?>">
<meta property=“og:type” content=“Website”>
<meta property=“og:title” content="<?php echo config(‘site-title’)?>">
<meta property=“og:description” content="<?php echo $description?>">
<meta property=“og:image” content="<?php echo assetUrl(config(‘site_logo’, ‘assets/images/logo.png’))?>">

$theme = config(‘theme’, ‘main’);
$colors = path(‘styles/’.config(‘theme’, ‘main’).’/colors.php’);

my website is

my audio links work on desktop and mobile broswers. however, on twitter app itself it does not show a preview image of the player card. how do i fix this…

this is one of the links



Not sure exactly what the problem is here, but you can validate your card meta tags here: I can see your card render properly there.

You can also check out these docs:

closed #3

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