为了账号安全,请及时绑定邮箱和手机立即绑定

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

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

PHP
SMILET 2023-07-01 16:40:35
我在共享时有一个关于 facebook 共享器的问题,生成文件路径并在 facebook 上共享本机 gif,准备在用户的时间轴上显示。当然我正在使用.qa_html ($ this-> content ['description']).这是最终 .gif 文件的目标.qa_html ($ shareurl).是出版物的网址,是我希望用户在单击左下角和下图中的 facebook 上的网站按钮时重定向到的网址。有人可以告诉我如何通过在用户的时间轴上显示本机 gif 来继续更改 Facebook 的共享,但带有基于此信息的出版物地址?
查看完整描述

1 回答

?
慕仙森

TA贡献1827条经验 获得超7个赞

您可以通过添加此内容轻松做到这一点


$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/


查看完整回答
反对 回复 2023-07-01
  • 1 回答
  • 0 关注
  • 56 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信