我在共享時有一個關于 facebook 共享器的問題,生成文件路徑并在 facebook 上共享本機 gif,準備在用戶的時間軸上顯示。當然我正在使用.qa_html ($ this-> content ['description']).這是最終 .gif 文件的目標.qa_html ($ shareurl).是出版物的網址,是我希望用戶在單擊左下角和下圖中的 facebook 上的網站按鈕時重定向到的網址。有人可以告訴我如何通過在用戶的時間軸上顯示本機 gif 來繼續更改 Facebook 的共享,但帶有基于此信息的出版物地址?
1 回答

慕仙森
TA貢獻1827條經驗 獲得超8個贊
您可以通過添加此內容輕松做到這一點
$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/
- 1 回答
- 0 關注
- 134 瀏覽
添加回答
舉報
0/150
提交
取消