Summary: When you build an App on Facebook Platforms, the platform may notify your App of an event using Webhooks, a type of HTTPS API. This repository contains sample code of applications that implement Webhook servers.
When you develop an Application (or App) using platforms built on Facebook's Graph API, such as Facebook Messenger Platform or WhatsApp Business Platform's Cloud API, your applications often need to receive events from those platforms.
While the Graph API is an HTTPS interface by which your App can make API calls to Facebook, Webhooks are a technology that allows platforms to send events as HTTPS requests back to your App.
For example, in Facebook Messenger Platform or WhatsApp Cloud API, Webhooks are essential for receiving replies to messages that you've sent, or learning that messages have been read, couldn't be delivered, etc. While not all platforms use Webhooks for event notification, many do.
These are sample applications that you can use to get started developing Apps that use Webhooks with various Facebook Platforms.
Currently, they include Facebook's Webhooks product and Instagram's Subscriptions API.
- Heroku - A sample client that receives Webhook events.
- Hubot - A script that messages a chat room when a Facebook Page post is published using Webhooks.
The following samples repositories also incorporate Webhook usage as part of the sample:
- fbsamples/messenger-bot-samples: a sample bot for Messenger Platform. The Webhook code is part of
webhooks.js
The sample code is available under the MIT license, as documented in LICENSE.md.
As with any software that integrates with the Facebook platform, your use of this software is subject to the Facebook Developer Principles and Policies.
(c) Meta Platforms, Inc. and affiliates.