2017-03-03 48 views

回答

0

這裏是我想出了一個解決方案:

的共享鏈接到PDF直接,我分享一個HTML頁面的鏈接,重定向到PDF文件insted的。通過這種方式,您可以在頭文件中爲facebook抓取工具讀取Open Graph元標記,然後單擊鏈接將提供PDF文件。你將不得不指定你想要使用的標籤。

她是我做到了

<meta property="og:url" content="www.example.com/myfile.pdf?attach=0" /> 
<meta property="og:type" content="article" /> 
<meta property="og:title" content="This is the title" /> 
<meta property="og:description" content="here is the desctiption" /> 
<meta property="og:image" content="http://example.com/img.jpg /> 
<meta HTTP-EQUIV="REFRESH" content="0; url=www.example.com/myfile.pdf?attach=0"> 

?附加= 0表示該PDF應在瀏覽器中查看。

?附加= 1表示該PDF應下載。

要查看Facebook的元數據看,看看Open Graph Object Debugger

相關問題