Search code examples
facebookfacebook-messenger-bot

Using m.me links with ref param


I'm trying to deeplink users into my facebook messenger bot, and I need to pass some data in at the same time. Supposedly this can be done by using m.me links, along with a query param.

My bot's page is https://www.facebook.com/Willy-1610141399078870/

The m.me url would be something like this. https://m.me/Willy-1610141399078870?ref=somedatagoeshere

The m.me link works to a degree on desktop, but the data isn't passed to the bot. I don't particularly need it to work on desktop.

However, when I try to open that link on ios or android, I get an error message.

Android

This user name doesn't exist. Try another code or link

iOS

Username was not found

The bot hasn't been published yet, so it won't be visible to anyone else. I need to be able to test this functionality before I publish, so I hope that's not what is causing the failure.

Has anyone else been able to use this feature?


Solution

  • It seems that the facebook-generated username can't be used for m.me links. It requires you to register an explicit username.

    My page's generated name was Willy-1610141399078870, so https://m.me/Willy-1610141399078870 wasn't a valid url.

    To register a username for your page, go to your page > About > Create Page @username.

    Create a username

    Then, you can attempt to pick a username that isn't already taken. Somehow, @willy-the-test-page is already taken (?), so I got this incredibly confusing error message:

    This page isn't allowed to have a username

    Taking the error message at face value, I decided to create another page and try again. This time, realizing that the message didn't mean what it said. Picking an available username clears the error message, and allows registration.

    username registration

    Just kidding! It will tell you again that the page isn't eligible.

    actually, no


    The solution was to create a totally new page, and go through the @username creation flow again. It worked for me on the second attempt.

    It's rumored that a page needs at least 25 likes to become eligible for an @username, but this isn't true in all cases.