====== Standard usage ====== By default messenger bot sends updates based on subscribed article categories. Users will be subscribed to main category of article on which page optin button is located. ==== Inserting Shortcode into Page ==== FB messenger bot plugin needs to be inserted into page, to display optin button for users on frontend. In visual editor use shortcode plugin button {{:skoda-ep:modules:fb-app-5.png?600|}} Or in texteditor shorcode: ''[fb-msg-optin msg="Optin for notification!"]'' msg => This message displayed on fronend above optin fb button {{:skoda-ep:modules:fb-app-6.png?200|}} ==== Publishing post with notification ==== When publishing new post (or updating older one, which was not notified by FB messenger bot) check "Send one-time publish notification" option. {{:skoda-ep:modules:page_publish.png?200|}} After publishing/updating, all users opted for selected main category will be notified. In case that wordpress doesn't include "main category" function, notifications will be sent to all assigned post categories. Notifications for each post will by sent only once. ====== Extender usage ====== When extender module is loaded, bot will publish post notifications based on POST_TYPE of published content. For example: if user subscribes to `post`, he will be notified on every new `post` (article) published regardless on category of mentioned post. ==== POST_TYPE Setup ==== In SKODA options -> FB msg - global tab -> section `EXTENDER SETTINGS` you can check which POST_TYPE will be available to optin to. Editor then will be able to create corresponding option buttons in posts/pages. {{:skoda-ep:modules:messenger_bot_module:extender-1.png?300|}} the optin button can be inserted: {{:skoda-ep:modules:messenger_bot_module:extender-2.png?300|}} Or in texteditor shorcode: ''[fb-msg-optin-ext msg="Message!" type="POST_TYPE-ID"]'' POST_TYPE ID is hard to setup/figure out, so rather use insertion by standard TinyMCE insert button - which contains easy to select dropbox list. ==== Publishing post with notification ==== Publishing is the same as in standard functionality -> only change is that if some users are subscribed to this post_type, will be notified regardless of article categories.