Skip to content

Commit

Permalink
Support flow without app verification
Browse files Browse the repository at this point in the history
  • Loading branch information
remdex committed Feb 20, 2025
1 parent 57e9c47 commit c69a7a1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions design/fbmessengertheme/tpl/lhfbmessenger/index.tpl.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?php if (erLhcoreClassUser::instance()->hasAccessTo('lhfbmessenger','use_fb_messenger') && !(isset(erLhcoreClassModule::getExtensionInstance('erLhcoreClassExtensionFbmessenger')->settings['fb_disabled']) && erLhcoreClassModule::getExtensionInstance('erLhcoreClassExtensionFbmessenger')->settings['fb_disabled'] === true)) : ?>

<h4><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('module/fbmessenger','Facebook chat');?></h4>

<?php if (!isset(erLhcoreClassModule::getExtensionInstance('erLhcoreClassExtensionFbmessenger')->settings['hide_fb_login']) || erLhcoreClassModule::getExtensionInstance('erLhcoreClassExtensionFbmessenger')->settings['hide_fb_login'] == false) : ?>

<?php
$user = erLhcoreClassModelFBMessengerUser::findOne(array('filter' => array('user_id' => erLhcoreClassUser::instance()->getUserID())));

Expand Down Expand Up @@ -29,12 +32,15 @@
$logoutFB = true;
}
?>
<ul>
<?php if (isset($logoutFB)) : ?>

<?php if (isset($logoutFB)) : ?>
<ul>
<li><a href="<?php echo erLhcoreClassDesign::baseurl('fbmessenger/myfbpages');?>"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('module/fbmessenger','My pages');?></a></li>
<li><a class="csfr-required" href="<?php echo erLhcoreClassDesign::baseurl('fbmessenger/fblogout');?>" class=""><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('module/fbmessenger','Logout');?></a></li>
<?php endif; ?>
</ul>
</ul>
<?php endif; ?>

<?php endif; ?>

<?php include(erLhcoreClassDesign::designtpl('lhkernel/secure_links.tpl.php')); ?>

Expand All @@ -44,7 +50,6 @@
<li><a href="<?php echo erLhcoreClassDesign::baseurl('fbmessenger/list')?>"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('module/fbmessenger','Facebook pages');?></a></li>
<?php endif; ?>
<li><a href="<?php echo erLhcoreClassDesign::baseurl('fbmessenger/leads')?>"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('module/fbmessenger','Leads');?></a></li>
<?php /*<li><a href="<?php echo erLhcoreClassDesign::baseurl('fbmessenger/notifications')?>"><?php echo erTranslationClassLhTranslation::getInstance()->getTranslation('module/fbmessenger','Notifications');?></a></li>*/ ?>
</ul>
<?php endif; ?>

Expand Down
2 changes: 1 addition & 1 deletion doc/messenger/incoming-webhook.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"FacebookMessengerApp","dep_id":1,"disabled":0,"identifier":"duibFEgsMn64Yz046ByQ","scope":"facebookmessengerappscope","configuration":"{\"attr\":[{\"key\":\"access_token\",\"value\":\"{messenger_access_token}\",\"id\":\"temp1628483295858\",\"$$hashKey\":\"object:563\"},{\"key\":\"host\",\"value\":\"https:\/\/graph.facebook.com\/v20.0\/\",\"id\":\"temp1628483311978\",\"$$hashKey\":\"object:565\"}],\"message_id\":\"messaging.0.message.mid\",\"message_id_reply\":\"messaging.0.message.reply_to.mid\",\"messages\":\"entry\",\"message_direct\":false,\"nick\":\"messaging.0.sender.id\",\"chat_id_2\":\"messaging.0.recipient.id\",\"chat_id\":\"messaging.0.sender.id\",\"phone\":\"\",\"main_cond\":\"object=page\",\"time\":\"\",\"msg_cond_op\":\"messaging.0.message.is_echo=true\",\"msg_body\":\"{{msg.messaging.0.message.text}}\",\"chat_id_template\":\"{chat_id}\",\"msg_cond\":\"messaging.0.message.text=__exists__\",\"msg_cond_2\":\"\",\"msg_cond_op_2\":\"\",\"msg_body_2\":\"\",\"msg_cond_img\":\"messaging.0.message.attachments.0.type=image\",\"msg_cond_img_op\":\"messaging.0.message.is_echo=true\",\"msg_cond_img_body\":\"messaging.0.message.attachments.0.payload.url\",\"msg_img\":\"{{msg.messaging.0.message.attachments.0.payload.url}}\",\"msg_img_download\":true,\"msg_attachments\":\"{{msg.messaging.0.message.attachments.0.payload.url}}\",\"msg_cond_attachments_op\":\"messaging.0.message.is_echo=true\",\"msg_cond_attachments\":\"messaging.0.message.attachments.0.type=file\",\"msg_cond_attachments_body\":\"messaging.0.message.attachments.0.payload.url\",\"msg_attachments_download\":true,\"msg_cond_op_3\":\"\",\"msg_cond_3\":\"\",\"msg_body_3\":\"\",\"msg_cond_img_2\":\"messaging.0.message.attachments.0.type=audio\",\"msg_cond_img_2_op\":\"messaging.0.message.is_echo=true\",\"msg_img_2\":\"{{msg.messaging.0.message.attachments.0.payload.url}}\",\"msg_img_2_download\":true,\"msg_cond_img_2_body\":\"messaging.0.message.attachments.0.payload.url\",\"msg_img_3\":\"{{msg.messaging.0.message.attachments.0.payload.url}}\",\"msg_img_3_download\":true,\"msg_cond_img_3_body\":\"messaging.0.message.attachments.0.payload.url\",\"msg_cond_img_3\":\"messaging.0.message.attachments.0.type=video\",\"msg_cond_img_3_op\":\"messaging.0.message.is_echo=true\",\"msg_cond_img_3_file_name\":\"\",\"chat_status\":\"\",\"msg_body_4\":\"\",\"msg_cond_4\":\"\",\"msg_cond_op_4\":\"\",\"msg_cond_img_url_decode\":\"\",\"msg_cond_img_url_headers_content\":\"\",\"msg_cond_img_url_decode_output\":\"\",\"msg_cond_img_url_remote_location\":false,\"msg_cond_img_url_remote_headers_content\":\"\",\"msg_cond_attachments_url_decode\":\"\",\"msg_cond_attachments_url_headers_content\":\"\",\"msg_cond_attachments_url_remote_headers_content\":\"\",\"msg_cond_attachments_url_remote_location\":false,\"msg_cond_attachments_url_decode_output\":\"\",\"msg_cond_attachments_file_name\":\"\",\"msg_cond_img_2_url_decode\":\"\",\"msg_cond_img_2_url_decode_output\":\"\",\"msg_cond_img_2_url_headers_content\":\"\",\"msg_cond_img_2_url_remote_location\":false,\"msg_cond_img_2_url_remote_headers_content\":\"\",\"msg_cond_img_3_url_decode\":\"\",\"msg_cond_img_3_url_decode_output\":\"\",\"msg_cond_img_3_url_headers_content\":\"\",\"msg_cond_img_3_url_remote_location\":false,\"msg_cond_img_3_url_remote_headers_content\":\"\",\"msg_img_4\":\"\",\"msg_img_4_download\":false,\"msg_cond_img_4_body\":\"\",\"msg_cond_img_4_file_name\":\"\",\"msg_cond_img_4_url_decode\":\"\",\"msg_cond_img_4_url_headers_content\":\"\",\"msg_cond_img_4_url_decode_output\":\"\",\"msg_cond_img_4_url_remote_location\":false,\"msg_cond_img_4_url_remote_headers_content\":\"\",\"msg_cond_img_4\":\"\",\"add_field_2_value\":\"\",\"chat_id_preg_rule\":\"\",\"chat_id_preg_value\":\"\",\"msg_btn_body_1\":\"\",\"msg_btn_payload_1\":\"messaging.0.message.quick_reply.payload\",\"msg_btn_cond_2\":\"messaging.0.postback.payload=__exists__\",\"msg_btn_cond_1\":\"messaging.0.message.quick_reply.payload=__exists__\",\"msg_btn_body_2\":\"\",\"msg_btn_payload_2\":\"messaging.0.postback.payload\",\"msg_btn_payload_3\":\"\",\"msg_btn_cond_3\":\"\",\"chat_id_switch\":\"messaging.0.message.is_echo=true\",\"msg_delivery_reaction_id\":\"messaging.0.reaction.mid\",\"msg_delivery_reaction_condition\":\"messaging.0.reaction.action=react\",\"msg_delivery_reaction_location\":\"messaging.0.reaction.emoji\",\"msg_delivery_reaction_use_emoji\":true,\"msg_delivery_reaction_remove_prev\":true,\"msg_delivery_un_reaction_condition\":\"messaging.0.reaction.action=unreact\",\"msg_delivery_un_reaction_id\":\"messaging.0.reaction.mid\",\"msg_delivery_un_reaction_use_emoji\":true,\"msg_delivery_delivered_id\":\"messaging.0.delivery.mids.0\",\"msg_delivery_delivered_condition\":\"messaging.0.delivery.mids=__exists__\",\"msg_delivery_read_condition\":\"messaging.0.read.watermark=__exists__\",\"msg_delivery_read_id\":\"messaging.0.read.watermark\",\"msg_delivery_read_global\":true}","icon":"social\/messenger-ico.png","icon_color":"","log_incoming":0,"log_failed_parse":0}
{"name":"FacebookMessengerApp","dep_id":1,"disabled":0,"identifier":"duibFEgsMn64Yz046ByQ","scope":"facebookmessengerappscope","configuration":"{\"attr\":[{\"key\":\"access_token\",\"value\":\"{messenger_access_token}\",\"id\":\"temp1628483295858\",\"$$hashKey\":\"object:563\"},{\"key\":\"host\",\"value\":\"https:\/\/graph.facebook.com\/v20.0\/\",\"id\":\"temp1628483311978\",\"$$hashKey\":\"object:565\"}],\"message_id\":\"messaging.0.message.mid\",\"message_id_reply\":\"messaging.0.message.reply_to.mid\",\"messages\":\"entry\",\"message_direct\":false,\"nick\":\"messaging.0.sender.id\",\"chat_id_2\":\"messaging.0.recipient.id\",\"chat_id\":\"messaging.0.sender.id\",\"phone\":\"\",\"main_cond\":\"object=page\",\"time\":\"\",\"msg_cond_op\":\"messaging.0.message.is_echo=true\",\"msg_body\":\"{{msg.messaging.0.message.text}}\",\"chat_id_template\":\"{chat_id}\",\"msg_cond\":\"messaging.0.message.text=__exists__\",\"msg_cond_2\":\"\",\"msg_cond_op_2\":\"\",\"msg_body_2\":\"\",\"msg_cond_img\":\"messaging.0.message.attachments.0.type=image\",\"msg_cond_img_op\":\"messaging.0.message.is_echo=true\",\"msg_cond_img_body\":\"messaging.0.message.attachments.0.payload.url\",\"msg_img\":\"{{msg.messaging.0.message.attachments.0.payload.url}}\",\"msg_img_download\":true,\"msg_attachments\":\"{{msg.messaging.0.message.attachments.0.payload.url}}\",\"msg_cond_attachments_op\":\"messaging.0.message.is_echo=true\",\"msg_cond_attachments\":\"messaging.0.message.attachments.0.type=file\",\"msg_cond_attachments_body\":\"messaging.0.message.attachments.0.payload.url\",\"msg_attachments_download\":true,\"msg_cond_op_3\":\"\",\"msg_cond_3\":\"\",\"msg_body_3\":\"\",\"msg_cond_img_2\":\"messaging.0.message.attachments.0.type=audio\",\"msg_cond_img_2_op\":\"messaging.0.message.is_echo=true\",\"msg_img_2\":\"{{msg.messaging.0.message.attachments.0.payload.url}}\",\"msg_img_2_download\":true,\"msg_cond_img_2_body\":\"messaging.0.message.attachments.0.payload.url\",\"msg_img_3\":\"{{msg.messaging.0.message.attachments.0.payload.url}}\",\"msg_img_3_download\":true,\"msg_cond_img_3_body\":\"messaging.0.message.attachments.0.payload.url\",\"msg_cond_img_3\":\"messaging.0.message.attachments.0.type=video\",\"msg_cond_img_3_op\":\"messaging.0.message.is_echo=true\",\"msg_cond_img_3_file_name\":\"\",\"chat_status\":\"\",\"msg_body_4\":\"\",\"msg_cond_4\":\"\",\"msg_cond_op_4\":\"\",\"msg_cond_img_url_decode\":\"\",\"msg_cond_img_url_headers_content\":\"\",\"msg_cond_img_url_decode_output\":\"\",\"msg_cond_img_url_remote_location\":false,\"msg_cond_img_url_remote_headers_content\":\"\",\"msg_cond_attachments_url_decode\":\"\",\"msg_cond_attachments_url_headers_content\":\"\",\"msg_cond_attachments_url_remote_headers_content\":\"\",\"msg_cond_attachments_url_remote_location\":false,\"msg_cond_attachments_url_decode_output\":\"\",\"msg_cond_attachments_file_name\":\"\",\"msg_cond_img_2_url_decode\":\"\",\"msg_cond_img_2_url_decode_output\":\"\",\"msg_cond_img_2_url_headers_content\":\"\",\"msg_cond_img_2_url_remote_location\":false,\"msg_cond_img_2_url_remote_headers_content\":\"\",\"msg_cond_img_3_url_decode\":\"\",\"msg_cond_img_3_url_decode_output\":\"\",\"msg_cond_img_3_url_headers_content\":\"\",\"msg_cond_img_3_url_remote_location\":false,\"msg_cond_img_3_url_remote_headers_content\":\"\",\"msg_img_4\":\"\",\"msg_img_4_download\":false,\"msg_cond_img_4_body\":\"\",\"msg_cond_img_4_file_name\":\"\",\"msg_cond_img_4_url_decode\":\"\",\"msg_cond_img_4_url_headers_content\":\"\",\"msg_cond_img_4_url_decode_output\":\"\",\"msg_cond_img_4_url_remote_location\":false,\"msg_cond_img_4_url_remote_headers_content\":\"\",\"msg_cond_img_4\":\"\",\"add_field_2_value\":\"\",\"chat_id_preg_rule\":\"\",\"chat_id_preg_value\":\"\",\"msg_btn_body_1\":\"\",\"msg_btn_payload_1\":\"messaging.0.message.quick_reply.payload\",\"msg_btn_cond_2\":\"messaging.0.postback.payload=__exists__\",\"msg_btn_cond_1\":\"messaging.0.message.quick_reply.payload=__exists__\",\"msg_btn_body_2\":\"\",\"msg_btn_payload_2\":\"messaging.0.postback.payload\",\"msg_btn_payload_3\":\"\",\"msg_btn_cond_3\":\"\",\"chat_id_switch\":\"messaging.0.message.is_echo=true\",\"msg_delivery_reaction_id\":\"messaging.0.reaction.mid\",\"msg_delivery_reaction_condition\":\"messaging.0.reaction.action=react\",\"msg_delivery_reaction_location\":\"messaging.0.reaction.emoji\",\"msg_delivery_reaction_use_emoji\":true,\"msg_delivery_reaction_remove_prev\":true,\"msg_delivery_un_reaction_condition\":\"messaging.0.reaction.action=unreact\",\"msg_delivery_un_reaction_id\":\"messaging.0.reaction.mid\",\"msg_delivery_un_reaction_use_emoji\":true,\"msg_delivery_delivered_id\":\"messaging.0.delivery.mids.0\",\"msg_delivery_delivered_condition\":\"messaging.0.delivery.mids=__exists__\",\"msg_delivery_read_condition\":\"messaging.0.read.watermark=__exists__\",\"msg_delivery_read_id\":\"messaging.0.read.watermark\",\"msg_delivery_read_global\":true,\"message_id_uniq\":true}","icon":"social\/messenger-ico.png","icon_color":"","log_incoming":0,"log_failed_parse":0}

0 comments on commit c69a7a1

Please sign in to comment.