如何解决 gif 共享 facebook sharer.php 的问题

我在共享时有一个关于 facebook 共享器的问题,生成文件路径并在 facebook 上共享本机 gif,准备在用户的时间轴上显示。当然我正在使用

.qa_html ($ this-> content ['description']).

这是最终 .gif 文件的目标

.qa_html ($ shareurl).是出版物的网址,是我希望用户在单击左下角和下图中的 facebook 上的网站按钮时重定向到的网址。

http://img1.mukewang.com/649fe6b00001e25f18601034.jpg

有人可以告诉我如何通过在用户的时间轴上显示本机 gif 来继续更改 Facebook 的共享,但带有基于此信息的出版物地址?



SMILET
浏览 142回答 1
1回答

慕仙森

您可以通过添加此内容轻松做到这一点$this->output('<meta property="og:url" content="'.$this->content['description'].'" />');由于最后的 CID,您将遇到 giphy 无法正确调用的问题,因此您需要让它从 filename.gif 之后的任何内容中删除数据。您可以在这里轻松做到这一点:`$re = '/(?<=gif).*/';$str = $this->content['description'];$subst = '';$result = preg_replace($re, $subst, $str);`$this->output('<meta property="og:url" content="'.$result.'" />');Place this code in /root/king-theme/YOURTHEME/king-theme.php and above the $this->output('<meta property="og:type" content="article" />');字体:dafitime https://kingsupport.kingthemes.net/
打开App,查看更多内容
随时随地看视频慕课网APP