Comments (3)
Hello @dominik04u. First of all, thanks for using our module.
I got many issues requests about the Facebook Challenge Hub. This was hard to code because I needed to create a "pure text" page with no HTML tags.
Some modules add blocks to all Magento pages and it may overwrite the webhook URL, which must NOT contain any blocks. Try looking for these blocks and exclude the itby adding <remove name="BLOCK_NAME" />
at Magento-Root/app/design/frontend/base/default/layout/werules_chatbot.xml
You should also check the URL like in this #60 (comment)
Please try that and let me know.
from magento-chatbot.
I changed your code a little. I changed this method:
`public function verifyWebhook($hub_token) {
if ($this->data['hub_verify_token'] == $hub_token) {
return $this->data['hub_challenge'];
}
return false;
}
to this:
public function verifyWebhook($hub_token) {
if ($_REQUEST['hub_verify_token'] == $hub_token) {
return $_REQUEST['hub_challenge'];
}
return false;
}
because it always was null in my case., because $rawData = file_get_contents("php://input");
always was null. Then the URL callback in fb was saved. I send messages to my bot, but it still doesn't work. I don't know why php://input was null, and I don't know if messages are receive. Do you have idea what can be wrong?
--UPDATE--
I added this in php.ini
allow_url_fopen = on
allow_url_include = on
Callback URL works only with $_REQUEST
from magento-chatbot.
Ok. I repaired this, but I have another problem. Your plugin wants information like
$this->data["entry"][0]["messaging"][0]["referral"]["ref"]
or
$this->data["entry"][0]["messaging"][0]["postback"]["payload"];
but request from facebook doesn't have them.
from magento-chatbot.
Related Issues (20)
- Saving model HOT 4
- Magento 2 HOT 2
- Can't open configuration in admin page after install magento-chatbot HOT 19
- How to setup and configure in facebook need proper document HOT 8
- Magento 1 HOT 6
- Messenger Settings Not Loaded HOT 21
- Does it work with Telegram ? (Magento 2 version) HOT 4
- Messenger Settings Fatal Error HOT 1
- version v1.0.7 Doesnt Reply HOT 7
- Product opens with a long url instead of [rewrite product url]
- Notify {"status":"error","success":false}
- Composer friendly repo
- Order Notifications on facebook HOT 4
- Not Showing On Home Page HOT 3
- Improvements and Option to Push, browse and schedule Magento CMS Notifications HOT 1
- [ANNOUNCEMENT] Magento 2 version HOT 4
- Modman support HOT 2
- Match challenge issue with Facebook HOT 1
- Can't add new command and replies
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magento-chatbot.