Open-source project
fbsamples/messenger-platform-samples avatar
fbsamples/messenger-platform-samples

Messenger Platform samples: a quick start plus API integration tutorials

Messenger Platform samples for sending and receiving messages. Walk through the Get Started with this code. https://developers.facebook.com/docs/messenger-platform/quickstart

1,751 stars2,547 forksJavaScriptNOASSERTION

At a glance

What is it?
fbsamples/messenger-platform-samples is Facebook's official collection of sample applications for sending and receiving Messenger Platform messages, covering a quick start, a Node implementation, Postman collections and API integration examples. It suits a developer doing the Get Started walkthrough, and the samples carry no open source license, only a proprietary one.
Who is it for?
Treat messenger-platform-samples as documentation you read rather than a library you depend on: it is the code that matches the Get Started guide, and it is the fastest way to explore webhook and send-call examples before you write any. Do not copy it into a product you intend to ship, because the README states the samples are fully copyrighted under the LICENSE file with no open source grant.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 12 days ago.
What is it written in?
Mainly JavaScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • fbsamples/messenger-platform-samples1,751 ★ · +1
Star history
Repository2026-10-162026-10-23
fbsamples/messenger-platform-samples1.8k1.8k

1 Stars in the last 7 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What the repository is: the code behind the quick start guide

This is the official source repository for Messenger Platform sample applications, and its stated purpose is to help you learn to build on the platform. The README points new users at the platform's Introduction section and then at the Get Started section for a walkthrough, so the repository is explicitly positioned as companion code to Meta's own documentation rather than as a standalone library.

There is no package you install, no exported API and no versioned release. The repository has no GitHub releases, so nothing here carries a version number you can pin against, and the primary language is JavaScript by count rather than by design.

That framing matters for how you should treat it. Samples age against a platform that changes on Meta's schedule, not the repository's. The last push was on 2026-10-10, which tells you the samples are being kept current, but it does not tell you which platform version they target, because the repository contains no release notes stating that.

The directory layout maps to the four things you have to get right

Reading the top level directory tells you what the samples cover. quick-start/ is the smallest path, the one matching the Get Started guide. node/ is the main JavaScript implementation. postman/ holds collections for poking at the API without writing code, which is the fastest way to see a send call succeed before any of your own server exists.

webview/ is a sample that returns web content to the user instead of plain text, and inter-page/ appears to cover interactions that span more than one surface. handover_protocol/ suggests a sample for the protocol Meta uses to hand a conversation to another business, which is a less common path that a general sample set often omits.

The rest are shared infrastructure. utils/ holds helpers used across samples, .github/ and CODE_OF_CONDUCT.md are community files, and images/ is documentation assets. The structure is the useful part: when you are working through a specific problem, the directory name tells you where the working example is.

The messenger-api subdirectory is a four-language tutorial set

Inside messenger-api/, the README describes a knowledge bank of blog articles with the code snippets and projects they use. Four are named.

There is messenger-api-with-python for integrating the Messenger API in a Python app, messenger-api-with-nodejs for sending messages to Facebook and Instagram users from Node.js, messenger-api-with-java for a Java integration, and messenger-api-and-webhooks for working with webhooks on the platform.

That last one deserves attention because webhooks are where most first implementations go wrong. The platform delivers events to an endpoint you expose, and the flow of verifying the request, confirming your token and returning the expected response has to be right before anything else works. Having a sample dedicated to it, rather than folded into a broader example, reflects that.

The Node.js article is worth noting for a specific reason: it covers sending to Facebook and Instagram users, not only Messenger. If your bot is meant to reach both surfaces, that distinction is the part of the integration that tends to be designed in late.

Postman and quick start are the two paths worth trying first

Two entry points serve different needs. postman/ is for the engineer who wants to know whether the platform is doing what they think before writing a server: you can drive a send call by hand and see the raw response. The limitation is that it proves nothing about your own deployment.

quick-start/ is the counterpart, the minimal application that matches the Get Started walkthrough. This is the one to clone when you want an end-to-end path: an endpoint that receives a webhook, and a send that returns a reply.

Neither path is documented in the README beyond their existence. There are no run instructions, no dependency lists, no environment variable names and no port numbers anywhere in the README, which means the setup steps live in Meta's documentation and in the files themselves. That is a real friction point for anyone trying to run a sample without following the external guide.

A practical note on where the samples are maintained: Meta points at a separate repository, fbsamples/messenger-bot-samples, for advanced sample apps showing popular platform features. If your goal is the send and receive basics, this repository is the right place; if you want richer features, that other one is.

The licence is the reason not to build on this code directly

This is the sharpest fact about the repository. The README states that Messenger Platform Samples are fully copyrighted as found in the LICENSE file, and GitHub cannot classify the licence as a standard open source identifier, which is consistent with a proprietary licence.

There is no MIT, no Apache, no BSD. The practical reading is that the code is there for you to learn from and to run, and copying it into a product or a service you offer is a different matter that the LICENSE file governs.

That does not make the samples less useful. Reading a working webhook handler, seeing the token verification, and observing the shape of a send payload is the point, and you can write your own implementation from that understanding. It does mean the repository is a reference, not a starting point, and anyone planning to productise a Messenger integration should consult the LICENSE and Meta's own platform terms rather than assume the MIT-like permissions that most sample repositories carry.

Contributions are handled through the CONTRIBUTING file, and a CODE_OF_CONDUCT file is present.

How to get value from it, and when to stop reading

The fastest use of this repository is a comparison exercise. Pick the language you will ship in, read that one sample end to end, and note every platform-specific detail it contains: how the webhook is verified, what the endpoint must return, how a reply is structured. Then read the same parts in a second language to separate the platform contract from the framework noise.

After that, stop reading samples and start reading documentation. Meta's Messenger Platform docs are the normative source, and the samples are a lagging indicator of them. Since this repository publishes no releases and no changelog, you have no way to tell whether a given sample reflects the current platform behaviour or last month's.

For anyone building a production bot, the things these samples deliberately leave out are the things that will consume your time: rate limiting, token rotation, permission scopes, error handling on delivery, and any analytics on delivery. None of that is in the sample set, and none of it should have been, because the samples exist to teach the happy path.

Editorial conclusion

Treat messenger-platform-samples as documentation you read rather than a library you depend on: it is the code that matches the Get Started guide, and it is the fastest way to explore webhook and send-call examples before you write any. Do not copy it into a product you intend to ship, because the README states the samples are fully copyrighted under the LICENSE file with no open source grant. Before using anything here, confirm your app has a public HTTPS endpoint with a verified token for the webhook, and check the Meta documentation alongside each sample since the repository carries no versioned releases to pin against.

Frequently asked questions

Where do I start with the Messenger Platform samples?

The README points new users at the platform Introduction section and the Get Started walkthrough in Meta's documentation. Inside the repository, quick-start/ is the minimal application matching that walkthrough, postman/ holds collections for trying API calls by hand, and node/ holds the main JavaScript implementation.

Which languages do the Messenger Platform samples cover?

The messenger-api/ directory contains articles with code for Python, Node.js and Java, plus a dedicated guide on working with webhooks. The Node.js article covers sending messages to Facebook and Instagram users as well as Messenger.

Can I use the Messenger Platform samples in a commercial project?

The README states the samples are fully copyrighted as found in the LICENSE file, and GitHub does not classify the licence as a standard open source one. Read the LICENSE file before copying code into a product; treat the samples as reference material for learning the platform.

Does the repository include Postman collections for the Messenger API?

Yes, the repository has a postman/ directory. It is the quickest way to exercise send calls against the platform without standing up your own webhook endpoint.

Official sources

  1. fbsamples/messenger-platform-samples on GitHub
  2. Issues
  3. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/fbsamples-messenger-platform-samples.svg)](https://hysenlabs.com/projects/fbsamples-messenger-platform-samples)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/fbsamples-messenger-platform-samples.svg)](https://hysenlabs.com/projects/fbsamples-messenger-platform-samples)

Was this useful?