Twitter card for your AVS/Clipshare script.

November 25, 2016 at 11:14 am

This is optional social video setup fot those who have active official Twitter account for website

Edit file: “/include/config.local.php”
In second line enter 2 new lines:

$config['domain']  = '';
$config['twitter'] = 'twitter name';

Of course change ‘’ to your domain name, without ‘http’ and ‘www’
Change twitter name to you twitter name that appear in twitter URL.

Create new empty file, name it “twitter.tpl” and upload to your template directory.
Now edit this file and enter this:

<meta name="twitter:card" content="player">
<meta name="twitter:site" content="@{$twitter}">
<meta name="twitter:creator" content="@{$twitter}">
<meta name="twitter:title" content="{$video.title|escape:'html'|truncate:80}">
<meta name="twitter:url" content="{$baseurl}/video/{$video.VID}/{$video.title|clean}?utm_source=twitter&utm_medium=social">
<meta name="twitter:image" content="{insert name=thumb_path vid=$video.VID}/{if $video.embed_code != ''}1{else}default{/if}.jpg">
<meta name="twitter:domain" content="{$domain}">
<meta name="twitter:player" content="{$baseurl}/embed/{$video.vkey}">
<meta name="twitter:player:width" content="640">
<meta name="twitter:player:height" content="360">

Finally edit file “header.tpl” in your template directory.
Below the line:

{if $view}

Enter this:

{if $twitter && $domain}{include file="twitter.tpl"}{/if}

That’s all.
Tutorial should be fine for AVS v3.1-v4 and Clipshare v5-v6
Twitter requires all URLs to be HTTPS protocol. If you’re website doesn’t use HTTPS protocol, forget about Twitter cards.

Was successfully integrated on our private video website. Card accepted by Twitter within some minutes. Shared video from our website correctly appeared and plays on Twitter.
I rather doubt if adult websites cards can be accepted by Twitter.