{"id":35461,"date":"2025-12-26T21:14:16","date_gmt":"2025-12-26T14:14:16","guid":{"rendered":"https:\/\/dps.media\/?p=35461"},"modified":"2025-12-26T21:18:02","modified_gmt":"2025-12-26T14:18:02","slug":"facebook-messenger-tich-hop-cau-hinh-chatwoot","status":"publish","type":"post","link":"https:\/\/dps.media\/zh\/facebook-messenger-tich-hop-cau-hinh-chatwoot\/","title":{"rendered":"Facebook Messenger \u96c6\u6210\u914d\u7f6e Chatwoot"},"content":{"rendered":"<?xml encoding=\"utf-8\" ?><article><header>\n<p>\u8981\u4f7f\u7528 Facebook \u6e20\u9053\uff0c\u60a8\u9700\u8981\u5728\u5f00\u53d1\u8005\u95e8\u6237\u4e2d\u521b\u5efa\u4e00\u4e2a Facebook \u5e94\u7528\u3002\u4ee5\u4e0b\u662f Self-hosted \u7248\u672c\u7684\u8be6\u7ec6\u8bbe\u7f6e\u6b65\u9aa4\u3002.<\/p>\n<\/header><hr>\n<section>\n<h2>1. \u5148\u51b3\u6761\u4ef6<\/h2>\n<ul>\n<li>\u6709\u6548\u7684 Facebook \u8d26\u6237\u3002.<\/li>\n<li>\u6b63\u5728\u8fd0\u884c\u7684 Facebook \u9875\u9762 (Page)\u3002.<\/li>\n<\/ul>\n<\/section>\n<section>\n<h2>2. \u6ce8\u518c Facebook \u5e94\u7528<\/h2>\n<p>\u8bbf\u95ee <a href=\"https:\/\/developers.facebook.com\/\" target=\"_blank\" rel=\"noopener nofollow\">Facebook \u5f00\u53d1\u8005\u95e8\u6237<\/a> \u5e76\u70b9\u51fb\u6309\u94ae <strong>\u201c\u521b\u5efa\u5e94\u7528\u201d<\/strong>.<\/p>\n<figure>\n<figure><img decoding=\"async\" style=\"width: 100%; height: auto;\" src=\"https:\/\/mintcdn.com\/chatwoot-447c5a93\/qGPxFBLJOb0CiH-G\/self-hosted\/images\/facebook\/facebook-create-app.png?fit=max&auto=format&n=qGPxFBLJOb0CiH-G&q=85&s=4afb1570f2e5f2f5a79661a5e83fd919\" alt=\"\u521b\u5efa Facebook \u5e94\u7528\" title=\"\"><\/figure>\n<\/figure>\n<h3>\u5e94\u7528\u7c7b\u578b\u8bbe\u7f6e\u6b65\u9aa4\uff1a<\/h3>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>\u9009\u62e9\u9009\u9879 <strong>\u201c\u5176\u4ed6\u201d<\/strong>.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<figure><img decoding=\"async\" style=\"width: 100%; height: auto; margin: 10px 0;\" src=\"https:\/\/mintcdn.com\/chatwoot-447c5a93\/qGPxFBLJOb0CiH-G\/self-hosted\/images\/facebook\/facebook_other_app.png?fit=max&auto=format&n=qGPxFBLJOb0CiH-G&q=85&s=5ebdaffa0d99578c4681798d9e81b0b7\" alt=\"\u9009\u62e9\u7c7b\u578b Other\" title=\"\"><\/figure>\n<p>\u00a0<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>\u5728\u5e94\u7528\u7c7b\u578b (app type) \u4e2d\uff0c\u9009\u62e9 <strong>\u201c\u5546\u52a1\u201d<\/strong>.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<figure><img decoding=\"async\" style=\"width: 100%; height: auto; margin: 10px 0;\" src=\"https:\/\/mintcdn.com\/chatwoot-447c5a93\/qGPxFBLJOb0CiH-G\/self-hosted\/images\/facebook\/facebook_business.png?fit=max&auto=format&n=qGPxFBLJOb0CiH-G&q=85&s=14c2ac351761f69df0293a9181905039\" alt=\"\u9009\u62e9 Business App\" title=\"\"><\/figure>\n<p>\u00a0<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>\u8f93\u5165\u57fa\u672c\u4fe1\u606f\uff0c\u5982\u5e94\u7528\u540d\u79f0\u548c\u8054\u7cfb\u90ae\u7bb1\u3002.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<figure><img decoding=\"async\" style=\"width: 100%; height: auto; margin: 10px 0;\" src=\"https:\/\/mintcdn.com\/chatwoot-447c5a93\/qGPxFBLJOb0CiH-G\/self-hosted\/images\/facebook\/facebook_business_details.png?fit=max&auto=format&n=qGPxFBLJOb0CiH-G&q=85&s=3428088d33abdd74860fa9d974ac83ab\" alt=\"\u8f93\u5165\u5e94\u7528\u4fe1\u606f\" title=\"\"><\/figure>\n<p>\u00a0<\/p>\n<p>\u6ce8\u518c\u540e\uff0c\u8bf7\u4fdd\u5b58 <strong>App Id<\/strong> \u548c <strong>App Secret<\/strong> \u5728\u8bbe\u7f6e\u90e8\u5206\u7528\u4e8e Chatwoot\u3002.<\/p>\n<figure><img decoding=\"async\" style=\"width: 100%; height: auto;\" src=\"https:\/\/mintcdn.com\/chatwoot-447c5a93\/qGPxFBLJOb0CiH-G\/self-hosted\/images\/facebook\/facebook_app_id.png?fit=max&auto=format&n=qGPxFBLJOb0CiH-G&q=85&s=d64ef05f514cb3d8d915be3a7b4ee4d0\" alt=\"\u83b7\u53d6 App ID \u548c Secret\" title=\"\"><\/figure>\n<p>\u00a0<\/p>\n<\/section>\n<section>\n<h2>3. \u5728 Chatwoot \u4e2d\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/h2>\n<p>\u5c06\u4ee5\u4e0b\u503c\u66f4\u65b0\u5230\u60a8\u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\u3002. <code>FB_VERIFY_TOKEN<\/code> \u5e94\u662f\u4e00\u4e2a\u968f\u673a\u4e14\u5b89\u5168\u7684\u5b57\u7b26\u4e32\u3002.<\/p>\n<pre style=\"background: #f4f4f4; padding: 15px; border-left: 5px solid #ccc;\">FB_VERIFY_TOKEN=your_secure_token\nFB_APP_SECRET=your_facebook_app_secret\nFB_APP_ID=your_facebook_app_id<\/pre>\n<p><em>* \u66f4\u65b0\u540e\u522b\u5fd8\u4e86\u91cd\u542f Chatwoot \u670d\u52a1\u5668\u3002.<\/em><\/p>\n<\/section>\n<section>\n<h2>4. \u914d\u7f6e Facebook \u767b\u5f55<\/h2>\n<p>\u6dfb\u52a0\u4ea7\u54c1 <strong>Facebook\u767b\u5f55<\/strong> \u5728\u5e94\u7528\u63a7\u5236\u9762\u677f\u4e2d\u3002.<\/p>\n<figure><img decoding=\"async\" style=\"width: 100%; height: auto;\" src=\"https:\/\/mintcdn.com\/chatwoot-447c5a93\/qGPxFBLJOb0CiH-G\/self-hosted\/images\/facebook\/facebook_app_login.png?fit=max&auto=format&n=qGPxFBLJOb0CiH-G&q=85&s=283d0725950afe4d28e32814fba43e79\" alt=\"\u6dfb\u52a0 Facebook \u767b\u5f55\" title=\"\"><\/figure>\n<p>\u00a0<\/p>\n<p>\u542f\u7528 <strong>Web OAuth \u767b\u5f55<\/strong>, <strong>\u4f7f\u7528 Javascript SDK \u767b\u5f55<\/strong> \u5e76\u5c06\u60a8\u7684\u57df\u540d\u586b\u5199\u5230\u6846\u4e2d <strong>\u5141\u8bb8\u7684\u57df\u540d<\/strong>.<\/p>\n<figure><img decoding=\"async\" style=\"width: 100%; height: auto;\" src=\"https:\/\/mintcdn.com\/chatwoot-447c5a93\/qGPxFBLJOb0CiH-G\/self-hosted\/images\/facebook\/facebook_sdk_login.png?fit=max&auto=format&n=qGPxFBLJOb0CiH-G&q=85&s=f35ade876b39f421770c337e221b04fb\" alt=\"\u914d\u7f6e SDK \u767b\u5f55\" title=\"\"><\/figure>\n<p>\u00a0<\/p>\n<\/section>\n<section>\n<h2>5. \u8bbe\u7f6e Messenger \u548c Webhook<\/h2>\n<p>\u6dfb\u52a0\u5b89\u88c5 Chatwoot \u7684\u57df\u540d\u5230 <strong>\u5e94\u7528\u57df\u540d<\/strong> \u5728\u5e38\u89c4\u8bbe\u7f6e\u90e8\u5206\u3002.<\/p>\n<figure><img decoding=\"async\" style=\"width: 100%; height: auto;\" src=\"https:\/\/mintcdn.com\/chatwoot-447c5a93\/qGPxFBLJOb0CiH-G\/self-hosted\/images\/facebook\/facebook_app_domain.png?fit=max&auto=format&n=qGPxFBLJOb0CiH-G&q=85&s=eb9ffd310cde30181c1e44202d712fc9\" alt=\"\u914d\u7f6e\u5e94\u7528\u57df\u540d\" title=\"\"><\/figure>\n<p>\u00a0<\/p>\n<p>\u6dfb\u52a0\u4ea7\u54c1 <strong>Messenger<\/strong> \u5e76\u914d\u7f6e <strong>\u56de\u8c03 URL<\/strong>.<\/p>\n<figure><img decoding=\"async\" style=\"width: 100%; height: auto; margin-bottom: 10px;\" src=\"https:\/\/mintcdn.com\/chatwoot-447c5a93\/qGPxFBLJOb0CiH-G\/self-hosted\/images\/facebook\/facebook_messenger_product.png?fit=max&auto=format&n=qGPxFBLJOb0CiH-G&q=85&s=bc86a99f579b81307f0f768560210ac9\" alt=\"\u6dfb\u52a0 Messenger \u4ea7\u54c1\" title=\"\"><\/figure>\n<p>\u00a0<\/p>\n<p>\u586b\u5199\u56de\u8c03 URL\uff0c\u683c\u5f0f\u4e3a\uff1a <code>{domain_cua_ban}\/bot<\/code> \u5e76\u8f93\u5165\u76f8\u5e94\u7684 Verify token\u3002.<\/p>\n<figure><img decoding=\"async\" style=\"width: 100%; height: auto;\" src=\"https:\/\/mintcdn.com\/chatwoot-447c5a93\/qGPxFBLJOb0CiH-G\/self-hosted\/images\/facebook\/facebook_callback_url.png?fit=max&auto=format&n=qGPxFBLJOb0CiH-G&q=85&s=15acb2a12b01ff67398357d5ec6a1177\" alt=\"\u914d\u7f6e\u56de\u8c03 URL\" title=\"\"><\/figure>\n<p>\u00a0<\/p>\n<\/section>\n<section style=\"background-color: #fff3cd; padding: 15px; border: 1px solid #ffeeba; border-radius: 4px; margin: 20px 0;\"><strong>\u8b66\u544a\uff1a<\/strong> \u786e\u4fdd Facebook \u5e94\u7528\u7684\u8ba2\u9605\u7248\u672c\u662f <strong>17.0<\/strong>. \u3002\u5982\u679c\u9700\u8981\uff0c\u8bf7\u5728 Webhooks \u9009\u9879\u4e2d\u66f4\u65b0\u3002.<\/section>\n<section>\n<h2>6. \u6295\u5165\u751f\u4ea7<\/h2>\n<p>\u5728\u6b63\u5f0f\u8fd0\u884c\u4e4b\u524d\uff0c\u60a8\u9700\u8981\u8bf7\u6c42 <strong>\u9ad8\u7ea7\u8bbf\u95ee\u6743\u9650<\/strong> \u4ee5\u4e0b\u9879\u76ee\uff1a<\/p>\n<ul>\n<li><code>pages_messaging<\/code> \uff08\u4ee3\u8868\u9875\u9762\u53d1\u9001\u6d88\u606f\uff09<\/li>\n<li><code>pages_show_list<\/code> \uff08\u5217\u51fa\u9875\u9762\uff09<\/li>\n<li><code>pages_manage_metadata<\/code> \uff08\u6ce8\u518c webhook\uff09<\/li>\n<li><code>business_management<\/code><\/li>\n<li><code>pages_read_engagement<\/code> \uff08\u8bfb\u53d6\u7528\u6237\u8d44\u6599\u6570\u636e\uff09<\/li>\n<\/ul>\n<figure><img decoding=\"async\" style=\"width: 100%; height: auto;\" src=\"https:\/\/mintcdn.com\/chatwoot-447c5a93\/qGPxFBLJOb0CiH-G\/self-hosted\/images\/facebook\/fb_api_version.png?fit=max&auto=format&n=qGPxFBLJOb0CiH-G&q=85&s=3557a9afbefe18dec0f35e3e28136f48\" alt=\"API \u7248\u672c\" title=\"\"><\/figure>\n<p>\u00a0<\/p>\n<\/section>\n<\/article>\n<style>\r\n.lwrp.link-whisper-related-posts{\r\n            \r\n            margin-top: 40px;\nmargin-bottom: 30px;\r\n        }\r\n        .lwrp .lwrp-title{\r\n            \r\n            \r\n        }.lwrp .lwrp-description{\r\n            \r\n            \r\n\r\n        }\r\n        .lwrp .lwrp-list-container{\r\n        }\r\n        .lwrp .lwrp-list-multi-container{\r\n            display: flex;\r\n        }\r\n        .lwrp .lwrp-list-double{\r\n            width: 48%;\r\n        }\r\n        .lwrp .lwrp-list-triple{\r\n            width: 32%;\r\n        }\r\n        .lwrp .lwrp-list-row-container{\r\n            display: flex;\r\n            justify-content: space-between;\r\n        }\r\n        .lwrp .lwrp-list-row-container .lwrp-list-item{\r\n            width: calc(33% - 20px);\r\n        }\r\n        .lwrp .lwrp-list-item:not(.lwrp-no-posts-message-item){\r\n            \r\n            max-width: 150px;\r\n        }\r\n        .lwrp .lwrp-list-item img{\r\n            max-width: 100%;\r\n            height: auto;\r\n            object-fit: cover;\r\n            aspect-ratio: 1 \/ 1;\r\n        }\r\n        .lwrp .lwrp-list-item.lwrp-empty-list-item{\r\n            background: initial !important;\r\n        }\r\n        .lwrp .lwrp-list-item .lwrp-list-link .lwrp-list-link-title-text,\r\n        .lwrp .lwrp-list-item .lwrp-list-no-posts-message{\r\n            \r\n            \r\n            \r\n            \r\n        }@media screen and (max-width: 480px) {\r\n            .lwrp.link-whisper-related-posts{\r\n                \r\n                \r\n            }\r\n            .lwrp .lwrp-title{\r\n                \r\n                \r\n            }.lwrp .lwrp-description{\r\n                \r\n                \r\n            }\r\n            .lwrp .lwrp-list-multi-container{\r\n                flex-direction: column;\r\n            }\r\n            .lwrp .lwrp-list-multi-container ul.lwrp-list{\r\n                margin-top: 0px;\r\n                margin-bottom: 0px;\r\n                padding-top: 0px;\r\n                padding-bottom: 0px;\r\n            }\r\n            .lwrp .lwrp-list-double,\r\n            .lwrp .lwrp-list-triple{\r\n                width: 100%;\r\n            }\r\n            .lwrp .lwrp-list-row-container{\r\n                justify-content: initial;\r\n                flex-direction: column;\r\n            }\r\n            .lwrp .lwrp-list-row-container .lwrp-list-item{\r\n                width: 100%;\r\n            }\r\n            .lwrp .lwrp-list-item:not(.lwrp-no-posts-message-item){\r\n                \r\n                max-width: initial;\r\n            }\r\n            .lwrp .lwrp-list-item .lwrp-list-link .lwrp-list-link-title-text,\r\n            .lwrp .lwrp-list-item .lwrp-list-no-posts-message{\r\n                \r\n                \r\n                \r\n                \r\n            };\r\n        }<\/style>\r\n<div id=\"link-whisper-related-posts-widget\" class=\"link-whisper-related-posts lwrp\">\r\n            <div class=\"lwrp-title\">\u76f8\u5173\u6587\u7ae0<\/div>    \r\n        <div class=\"lwrp-list-container\">\r\n                                <div class=\"lwrp-list lwrp-list-row-container lwrp-list-double-row\">\r\n                <div class=\"lwrp-list-item\"><a href=\"https:\/\/dps.media\/zh\/tiktok-stories-ads-%e5%a6%82%e4%bd%95%e5%88%a9%e7%94%a8%e8%bf%99%e7%a7%8d%e6%96%b0%e6%a0%bc%e5%bc%8f\/\" class=\"lwrp-list-link\"><span class=\"lwrp-list-link-title-text\">TikTok\u6545\u4e8b\u5e7f\u544a\uff1a\u5982\u4f55\u5229\u7528\u8fd9\u4e00\u65b0\u5e7f\u544a\u5f62\u5f0f<\/span><\/a><\/div><div class=\"lwrp-list-item\"><a href=\"https:\/\/dps.media\/zh\/%e6%98%af%e5%90%a6%e5%ba%94%e8%af%a5%e8%b4%ad%e4%b9%b0facebook%e7%b2%89%e4%b8%9d%e9%a1%b5%e7%82%b9%e8%b5%9e%ef%bc%8c%e5%af%b9seo%e7%9a%84%e5%88%a9%e5%bc%8a\/\" class=\"lwrp-list-link\"><span class=\"lwrp-list-link-title-text\">\u662f\u5426\u5e94\u8be5\u8d2d\u4e70Facebook\u7c89\u4e1d\u9875\u70b9\u8d5e\uff1fSEO\u7684\u5229\u5f0a\u4e0e\u5f71\u54cd<\/span><\/a><\/div><div class=\"lwrp-list-item\"><a href=\"https:\/\/dps.media\/zh\/dps-media%e7%9a%84%e4%b8%93%e4%b8%9a%e5%ae%a2%e6%88%b7%e6%9c%8d%e5%8a%a1%e6%b5%81%e7%a8%8b\/\" class=\"lwrp-list-link\"><span class=\"lwrp-list-link-title-text\">DPS.MEDIA\u7684\u4e13\u4e1a\u5ba2\u6237\u670d\u52a1\u6d41\u7a0b<\/span><\/a><\/div>                <\/div>\r\n                            <div class=\"lwrp-list lwrp-list-row-container lwrp-list-double-row\">\r\n                <div class=\"lwrp-list-item\"><a href=\"https:\/\/dps.media\/zh\/%e7%a5%9e%e7%a7%98%e7%94%b5%e5%bd%b1%e6%97%a0%e9%99%90%e7%81%ad%e9%ad%94%e5%89%91%e7%ac%ac%e4%b8%80%e9%83%a8%e5%88%86%e7%bb%93%e5%b1%80%e8%a2%ab%e6%8f%ad%e9%9c%b2\/\" class=\"lwrp-list-link\"><span class=\"lwrp-list-link-title-text\">\u300a\u9b3c\u706d\u4e4b\u5203\uff1a\u65e0\u9650\u57ce\u7bc7\u300b\u7b2c\u4e00\u90e8\u5206\u7ed3\u5c40\u4e4b\u8c1c\u63ed\u6653<\/span><\/a><\/div><div class=\"lwrp-list-item\"><a href=\"https:\/\/dps.media\/zh\/%e8%b4%ad%e4%b9%b0facebook%e7%b2%89%e4%b8%9d%e9%a1%b5%e5%9c%a8%e7%ba%bf%e9%94%80%e5%94%ae%e6%9c%8d%e8%a3%85%e5%8c%96%e5%a6%86%e5%93%81%e7%83%ad%e9%97%a8%e5%88%a9%e5%9f%ba\/\" class=\"lwrp-list-link\"><span class=\"lwrp-list-link-title-text\">\u8d2d\u4e70Facebook\u7c89\u4e1d\u9875\u5728\u7ebf\u9500\u552e \u2013 \u670d\u88c5\u3001\u7f8e\u5986\u3001\u70ed\u95e8\u7ec6\u5206\u5e02\u573a<\/span><\/a><\/div><div class=\"lwrp-list-item\"><a href=\"https:\/\/dps.media\/zh\/%e5%9f%9f%e5%90%8d%e7%ae%a1%e7%90%86-dns%e9%85%8d%e7%bd%ae-%e4%bc%81%e4%b8%9a%e5%9f%ba%e7%a1%80%e7%9f%a5%e8%af%86\/\" class=\"lwrp-list-link\"><span class=\"lwrp-list-link-title-text\">\u57df\u540d\u7ba1\u7406\u4e0eDNS\u914d\u7f6e - \u4f01\u4e1a\u57fa\u7840\u77e5\u8bc6<\/span><\/a><\/div>                <\/div>\r\n                <\/div>\r\n<\/div>","protected":false},"excerpt":{"rendered":"<p>{\"translations\":[{\"\u8981\u4f7f\u7528 Facebook \u9891\u9053\uff0c\u60a8\u9700\u8981\u5728\u5f00\u53d1\u8005\u95e8\u6237\u4e2d\u521b\u5efa Facebook \u5e94\u7528\u7a0b\u5e8f\u3002\u4ee5\u4e0b\u662f Self-hosted \u7248\u672c\u7684\u8be6\u7ec6\u8bbe\u7f6e\u6b65\u9aa4\u30021. \u5148\u51b3\u6761\u4ef6 \u6709\u6548\u7684 Facebook \u8d26\u6237\u3002\u6b63\u5728\u8fd0\u884c\u7684 Facebook \u9875\u9762 (Page)\u30022. \u6ce8\u518c Facebook \u5e94\u7528\u7a0b\u5e8f \u8bbf\u95ee Facebook Developer [\u2026]\"}]}<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-35461","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"acf":[],"rankmath_keywords":{"primary":"","secondary":[""]},"yoast_keywords":{"primary":"","secondary":[]},"yoast_focuskw":"","rankmath_focuskw":"","seo_keywords":{"primary":"","secondary":[""]},"_links":{"self":[{"href":"https:\/\/dps.media\/zh\/wp-json\/wp\/v2\/posts\/35461","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dps.media\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dps.media\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dps.media\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dps.media\/zh\/wp-json\/wp\/v2\/comments?post=35461"}],"version-history":[{"count":4,"href":"https:\/\/dps.media\/zh\/wp-json\/wp\/v2\/posts\/35461\/revisions"}],"predecessor-version":[{"id":35467,"href":"https:\/\/dps.media\/zh\/wp-json\/wp\/v2\/posts\/35461\/revisions\/35467"}],"wp:attachment":[{"href":"https:\/\/dps.media\/zh\/wp-json\/wp\/v2\/media?parent=35461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dps.media\/zh\/wp-json\/wp\/v2\/categories?post=35461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dps.media\/zh\/wp-json\/wp\/v2\/tags?post=35461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}