I have a question about the facebook shareer when sharing it, generates the file path and shares on facebook the native gif ready for display on the user's timeline. of course I'm using
.qa_html ($ this-> content ['description']).
which is the destination of the final .gif file
.qa_html ($ shareurl). is the url of the publication is the one that I want the user to be redirected to when clicking on the website button on facebook in the lower left corner as well as in the image below.
Could someone tell me how I can change the sharing to facebook continued by displaying the native gif on the user's timeline but with the address of the publication based on this information?
my meta variables
$this->output('<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />');
$this->head_links();
if ($this->template == 'question' && strpos(qa_get_state(), 'edit')===false ) {
$pagetitle=strlen($this->request) ? strip_tags($this->content['title']) : '';
$headtitle=(strlen($pagetitle) ? ($pagetitle.'') : '');
$this->output('<meta property="og:url" content="'.qa_html( $this->content['canonical'] ).'" />');
$this->output('<meta property="og:type" content="article" />');
$this->output('<meta property="og:title" content="'.qa_html( $headtitle ).'" />');
$this->output('<meta property="og:description" content="Click To Watch" />');
$this->output('<meta property="og:image" content="'.qa_html( $this->content['description'] ).'"/>');
$this->output('<meta name="twitter:card" content="summary_large_image">');
$this->output('<meta name="twitter:title" content="'.qa_html( $headtitle ).'">');
$this->output('<meta name="twitter:description" content="'.qa_html( $headtitle ).'">');
$this->output('<meta name="twitter:image" content="'.qa_html( $this->content['description'] ).'">');
$this->output('<meta itemprop="description" content="click to watch">');
$this->output('<meta itemprop="image" content="'.qa_html( $this->content['description'] ).'">');
$this->output('<link rel="image_src" type="image/jpeg" href="'.qa_html( $this->content['description'] ).'" />');
}
I am trying to adapt so that when the user clicks on the bottom left button that appears in the gif inside facebook, he will be redirected to the publication page. The pinterest function uses the following parameters and works well.
$this->output('<a class="share-badge pinshare" href="//www.pinterest.com/pin/create/button/?url='.qa_html( $shareurl ).'&media='.qa_html( $this->content['description'] ).'&description="
My question is how can I adapt the pinterest code to the facebook share code so that it works on facebook sharing, displaying the native gif on the user's timeline when the user clicks on the website address will be redirected to the related publication. just like on pinterest
PS: .qa_html ($ this-> content ['description']). is the final address of the file
ps: pinterest works fine could someone help me fix this? Thanks in advance. Any help will be welcome.
FULL CODE THEME https://pastebin.com/mXNfewVW
facebook sharer and social function code: (CODE CHANGED)
function socialshare()
{
$pagetitle=strlen($this->request) ? strip_tags($this->content['title']) : '';
$headtitle=(strlen($pagetitle) ? ($pagetitle) : '');
$shareurl= qa_path_html(qa_q_request($this->content['q_view']['raw']['postid'], $this->content['q_view']['raw']['title']), null, qa_opt('site_url'));
$this->output('<div class="share-overlay">');
$this->output('<a title="Share on Facebook" href="https://www.facebook.com/sharer/sharer.php?u='.qa_html( $this->content['description'] ).'" target="_blank" rel="nofollow" onclick="javascript:window.open(this.href, \'_blank\', \'menubar=no,toolbar=no,resizable=no,scrollbars=no,height=400,width=600\');return false;">');
$this->output('<i class="fab fa-facebook"></i></a>');
$this->output('<a class="share-badge twitter" href="http://twitter.com/share?text='.qa_html( $headtitle ).'&url='.qa_html( $shareurl ).'" title="Share on Twitter" rel="nofollow" target="_blank" onclick="avascript:window.open(this.href, \'_blank\', \'menubar=no,toolbar=no,resizable=no,scrollbars=no,height=400,width=600\');return false;"><i class="fab fa-twitter"></i></a>');
$this->output('<a class="share-badge pinshare" href="//www.pinterest.com/pin/create/button/?url='.qa_html( $shareurl ).'&media='.qa_html( $this->content['description'] ).'&description=" title="Pin It" target="_blank" onclick="javascript:window.open(this.href, \'\', \'menubar=no,toolbar=no,resizable=no,scrollbars=no,height=400,width=600\');return false;"><i class="fab fa-pinterest"></i></a>');
$this->output('</div>');
}
