<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Brent Hsieh on Medium]]></title>
        <description><![CDATA[Stories by Brent Hsieh on Medium]]></description>
        <link>https://medium.com/@horus882?source=rss-a8ff89bf5395------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*aNVuQubQJXyYlDF8R-cymQ.jpeg</url>
            <title>Stories by Brent Hsieh on Medium</title>
            <link>https://medium.com/@horus882?source=rss-a8ff89bf5395------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 13:24:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@horus882/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[在 Facebook Messenger 上創建人物角色 (Personas)]]></title>
            <link>https://medium.com/@horus882/%E5%9C%A8-facebook-messenger-%E4%B8%8A%E5%89%B5%E5%BB%BA%E4%BA%BA%E7%89%A9%E8%A7%92%E8%89%B2-personas-c64e43cbf71f?source=rss-a8ff89bf5395------2</link>
            <guid isPermaLink="false">https://medium.com/p/c64e43cbf71f</guid>
            <category><![CDATA[personas]]></category>
            <category><![CDATA[facebook-messenger]]></category>
            <category><![CDATA[bots]]></category>
            <category><![CDATA[facebook]]></category>
            <dc:creator><![CDATA[Brent Hsieh]]></dc:creator>
            <pubDate>Fri, 31 May 2019 06:42:59 GMT</pubDate>
            <atom:updated>2019-05-31T10:09:45.795Z</atom:updated>
            <content:encoded><![CDATA[<h3>在 Facebook Messenger 上創建人物 (Personas)</h3><p>去年看到滅火器粉絲團有波「回到 18 歲」的活動有使用到 Facebook Messenger 上 Personas 的這個功能，而手邊有個案子是粉絲團要做醫師諮詢(其實是心理測驗)的 Chatbot 剛好可以拿來做練習。</p><p>不過由於目前(2019/05/31)官方文件上還是標註為 BETA 版，不排除未來會有大改動的可能，還是以 Facebook 開發文件上的為準。</p><h3>關於人物 (Personas)</h3><p>簡單來說，就是在 Facebook Messenger 上建立一個虛擬的人物，透過這個人物，可以讓使用者們產生和該人物真的在互動的假象。人物發送訊息時，訊息上方會顯示該人物的名稱，原本粉絲團的大頭貼也會更換成該人物的圖像，如下圖：</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*Mdwv17IF56aJFU69J2DSxQ.jpeg" /><figcaption>示意圖</figcaption></figure><h3>目錄</h3><ul><li><a href="#2963">建立人物</a></li><li><a href="#7cda">檢索單一人物</a></li><li><a href="#0dfc">檢索所有可用人物</a></li><li><a href="#5c5a">刪除人物</a></li><li><a href="#3327">使用人物發送訊息</a></li></ul><h3>建立人物</h3><p>Request</p><pre>curl -X POST -H &quot;Content-Type: application/json&quot; -d &#39;{<br> &quot;name&quot;: &quot;Iron Man&quot;,<br> &quot;profile_picture_url&quot;: &quot;<a href="https://facebook.com/john_image.jpg">https://example.com/iron_man.jpg</a>&quot;,<br>}&#39;<br>&quot;<a href="https://graph.facebook.com/me/personas?access_token=">https://graph.facebook.com/me/personas?access_token=</a>&lt;PAGE_ACCESS_TOKEN&gt;&quot;</pre><p>Response</p><pre>{<br>    &quot;id&quot;: &quot;&lt;PERSONA_ID&gt;&quot;<br>}</pre><p>Note</p><ol><li>名稱如果是中文建議先轉為 Unicode，否則人物名稱可能會是亂碼(在 Windows 上有遇過這個問題)</li><li>&lt;PAGE_ACCESS_TOKEN&gt; 整串文字更換成你的 Page Access Token</li></ol><h3>檢索單一人物</h3><p>Request</p><pre>curl -X GET &quot;<a href="https://graph.facebook.com/">https://graph.facebook.com/</a>&lt;PERSONA_ID&gt;?access_token=&lt;PAGE_ACCESS_TOKEN&gt;&quot;</pre><p>Response</p><pre>{<br>     &quot;name&quot;: &quot;Iron Man&quot;,<br>     &quot;profile_picture_url&quot;: &quot;<a href="https://facebook.com/john_image.jpg">https://example.com/iron_man.jpg</a>&quot;,<br>     &quot;id&quot;: &quot;&lt;PERSONA_ID&gt;&quot;<br>}</pre><p>Note</p><ol><li>&lt;PERSONA_ID&gt; 為最初建立人物時所取得的 ID</li></ol><h3>檢索所有可用人物</h3><p>Request</p><pre>curl -X GET &quot;<a href="https://graph.facebook.com/me/personas?access_token=">https://graph.facebook.com/me/personas?access_token=</a>&lt;PAGE_ACCESS_TOKEN&gt;&quot;</pre><p>Response</p><pre>{<br>  &quot;data&quot;: [<br>    {<br>      &quot;name&quot;: &quot;Iron Man&quot;,<br>      &quot;profile_picture_url&quot;: &quot;<a href="https://example.com/iron_man.jpg">https://example.com/iron_man.jpg</a>&quot;,<br>      &quot;id&quot;: &quot;&lt;PERSONA_ID&gt;&quot;<br>    },<br>    {<br>      &quot;name&quot;: &quot;Black Widow&quot;,<br>      &quot;profile_picture_url&quot;: &quot;<a href="https://example.com/iron_man.jpg">https://example.com/</a>black_widow<a href="https://example.com/iron_man.jpg">.jpg</a>&quot;,<br>      &quot;id&quot;: &quot;&lt;PERSONA_ID&gt;&quot;<br>    },<br>  ],<br>  &quot;paging&quot;: {<br>    &quot;cursors&quot;: {<br>      &quot;before&quot;: &quot;QVFIUlMtR2ZATQlRtVUZALUlloV1&quot;,<br>      &quot;after&quot;: &quot;QVFIUkpnMGx0aTNvUjJNVmJUT0Yw&quot;<br>    }<br>  }<br>}</pre><h3>刪除人物</h3><p>Request</p><pre>curl -X DELETE &quot;<a href="https://graph.facebook.com/">https://graph.facebook.com/</a>&lt;PERSONA_ID&gt;?access_token=&lt;PAGE_ACCESS_TOKEN&gt;&quot;</pre><p>Response</p><pre>{<br>    &quot;success&quot;: true<br>}</pre><h3>使用人物發送訊息</h3><p>Request</p><pre>curl -X POST -H &quot;Content-Type: application/json&quot; -d &#39;{<br>  &quot;recipient&quot;:{<br>      &quot;id&quot;:&quot;&lt;USER_PSID&gt;&quot;<br>   },<br>  &quot;message&quot;:{<br>      &quot;text&quot;:&quot;I Love You 3000.&quot;,<br>   },<br>  &quot;persona_id&quot;: &quot;&lt;PERSONA_ID&gt;&quot;<br> }&#39; &quot;<a href="https://graph.facebook.com/me/messages?access_token=">https://graph.facebook.com/me/messages?access_token=</a>&lt;PAGE_ACCESS_TOKEN&gt;&quot;</pre><h3>參考連結</h3><p><strong>Personas (Beta) — Messenger 平台</strong><br><a href="https://developers.facebook.com/docs/messenger-platform/send-messages/personas/">https://developers.facebook.com/docs/messenger-platform/send-messages/personas/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c64e43cbf71f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>