Hey there,
anybody with an idea on the following problem:
I set up facebook webhooks. Its only possible to create one Callback URL, which was successful.
It was also successful to auto detect the incoming data.
The problem is now that there is only one callback but different payloads depending on what I want to receive.
For my example there is the messages webhook which has the following payload:
{
"object": "page",
"entry": [
{
"time": 1681588968806,
"id": "0",
"messaging": [
{
"sender": {
"id": "12334"
},
"recipient": {
"id": "23245"
},
"timestamp": "1527459824",
"message": {
"mid": "test_message_id",
"text": "test_message"
}
}
]
}
]
}
and there is the ratings webhook with the following payload:
{
"entry": [
{
"id": "0",
"time": 1681586295,
"changes": [
{
"field": "ratings",
"value": {
"comment_id": "44444444_444444444",
"created_time": 1681586295,
"item": "rating",
"open_graph_story_id": "444444",
"rating": 4,
"recommendation_type": "POSITIVE",
"review_text": "I like this!",
"reviewer_id": "444444",
"reviewer_name": "Test user",
"verb": "add"
}
}
]
}
],
"object": "page"
}
of course when i detect the data and I will receive other payload on another webhook i cannot work with the received “request data”
How to handle this now?
Maybe with hookdeck or something similar?
Thanks for any ideas!