> For the complete documentation index, see [llms.txt](https://docs.mylinkconnect.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mylinkconnect.com/basic-concepts/publishing/channels/facebook/messenger-referral.md).

# Messenger Referral

MyLINK Connect Facebook channel fully supports the Facebook Referral link format. This enables your chatbot to automatically present your user with different informations depending on a specific keyword added to your chat link.

## Building the chat link

A standard Facebook chat link would look something like this:

```
http://m.me/<PAGE_NAME>
```

Where \<PAGE\_NAME> is the name of your page. To build a referral link, you just add the referral parameter at the end of the link like this:

```
http://m.me/<PAGE_NAME>?ref=<REF_PARAM>
```

The \<REF\_PARAM> value can be anything you like and it is going to be the value your bot will be looking for.

{% hint style="info" %}
If your page does not have a unique name, the \<PAGE\_NAME> may not work. Use the page id instead: the page id can be retrieved by going into your page settings and selecting the "Messaging" menu section.
{% endhint %}

## Checking for a referral

Inside your chatbot, the referral (ref) value will be translated to a simple text. For your chatbot it will be like the user has typed the referral value. You can check this value anywhere in the chatbot by simply using a [global text detection operation](/actions-and-operations/input/global-detection.md).&#x20;

![](/files/-LnrJFcO-njkpXJs1deX)

## Further Reading

{% embed url="<https://developers.facebook.com/docs/messenger-platform/discovery/m-me-links/>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mylinkconnect.com/basic-concepts/publishing/channels/facebook/messenger-referral.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
