Facebook meta

支援 facebook 資訊抓取

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Facebook meta demo.</title>
        <link rel="icon" type="image/png" sizes="180x180" href="https://book.niceinfos.com/frontend/assets/html_facebook_meta_v3/images/logo.png" />

        <meta property="og:url" content="https://book.niceinfos.com/frontend/assets/html_facebook_meta_v3/" />
        <meta property="og:type" content="website" />
        <meta property="og:title" content="My First Page" />
        <meta property="og:description" content="This is my first page" />
        <meta property="og:image" content="https://book.niceinfos.com/frontend/assets/html_facebook_meta_v3/images/logo.png" />
        <meta property="og:image:secure_url" content="https://book.niceinfos.com/frontend/assets/html_facebook_meta_v3/images/logo.png" />
        <meta property="og:image:type" content="image/png" />
        <meta property="og:image:width" content="310" />
        <meta property="og:image:height" content="310" />
        <meta property="fb:app_id" content="" />
    </head>
    <body>
        Facebook meta demo.
    </body>
</html>

og:url

頁面網址

og:type

頁面類型,預設帶入 website

og:title

頁面標題

og:description

頁面說明,對應 <meta name="description" content="This is my first page"> 即可

og:image

顯示圖片,最低寬高 200 x 200

og:image:secure_url

顯示圖片 https 協定

og:image:type

顯示圖片類型

og:image:width

顯示圖片寬度

og:image:height

顯示圖片高度

fb:app_id

應用程式 ID,需要做洞察報告才需要填寫

Facebook 分享偵錯工具

demo