How can I stress test my Facebook Messenger App - messenger

I created a Facebook Messenger bot app, I want to know if my messenger bot app will work well when 1000 people or more are using it. Is there some way to stress test it? For example, if 1000 people are using it, I want to see if the app will crash or not.

You can use siege to stress test your messenger webhooks. Spin up 1000 concurrent users to see if your servers can handle the request.
https://www.joedog.org/siege-faq/

Related

Messenger - Chatbot without creating FB App for each Page

I built a chatbot that I plan to use with my pages. It's nothing special, only for development purposes. I used fastapi + mongodb + RASA NLU. It's all working fine with the integration by creating the app and subscribe to the webhook. the only problem I have is that I need to create one app per page. How can I link my chatbot to my page without creating an app all the time? I noticed ManyChat and ChatFuel can do this but I'm lost the fb developer documentation.
for reference, here's my current webhook setup.
https://myapp.com/webhook/<pageid_01>/
https://myapp.com/webhook/<pageid_02>/
https://myapp.com/webhook/<pageid_03>/
it's a workaround, of course. it works but I don't really want to maintain too many fb apps. not that I have many but between me and my friends who want to use my chatbot, it's not a pretty sight.
You can use the same webhook to handle events from multiple pages, but i don't think there is a way to make one fb messenger app for multiple pages! because the app will be receiving page-scoped unique Ids
You can just connect multiple pages to same app. And when you receive the event on your webhook, you can check the page-id and based on page-id, perform that page specific actions.

FB chatbot replies to me only

I created chatbot in Rasa and then integrated it to FB messenger.
Everything has been setup properly however there is a problem,only I can test it. When I text bot it replies me,but if my friend tries to do same thing,nothing happens.
I tried adding my friends to admin, developer or testers roles but they didn't receive the request to accept and hence when they talk to bot, bot is not replying still.
Can anyone please help by guiding me to what is missing.
So i found a solution for one of the problem where i had added few friends as testers but they were not receiving any request on their facebook notification.
Solution -> It's quite weird, people (testers) were getting notifications but that notifications can be seen only when they had opened their facebook account from desktop or laptop (and not mobile). It took me quite while to know about this fact. Another things is, facebook asks them to register themselves as developers before accepting the request. Once they register themselves on developers for facebook website, they can chat with your chatbot.
your friends will need to create a developer account(they have to navigate to https://developers.facebook.com and create the account there) and of course, you have to invite them as testers of your app. they will then need to accept the invite.
my non-techie friends had a hard time navigating the account creation process.

Facebook programmatically application creation

I'm facing the situation where I need to programmatically create multiple Facebook Messenger Apps to different chatbots. Pretty much something like ManyChat and ChatFuel. Can someone shed some light on how is it possible?
There's a thread on it from 2011 but I've been uncessful on finding documentation on these old Facebook API's.
Create a facebook application programmatically
Thanks!
There is no API for this. As ceejayoz mentioned, ManyChat and ChatFuel just run one app and use their customer's account with the rights manage_pages and subscribed_apps to subscribe the app to the customer's page.
That said, there is just one endpoint where all traffic is delivered to and the software has to route every message to this endpoint accordingly to the right page (using receiver_id in the payload).
Keep in mind that while you want to run several apps in parallel, you have to approve all of them. Without this approval, the app can not be reached from customers.
For more insight, see the FB docs:
https://developers.facebook.com/docs/facebook-login/access-tokens/?locale=en_US
And https://developers.facebook.com/docs/graph-api/reference/page/subscribed_apps

how to make my Facebook chatbot available for download

I want to make my bot available for download for testing purpose without
going through the actual review process of Facebook? This is just for testing purpose as I want to test how exactly end user will
download my bot from FB messenger platform and then will start using my bot. Is there a way/platform to try this? Can I do that?
(currently i am testing am sending message to my bot using FB page's messenger link as indicated in almost all the blogs/sites including FB's official
site.)
Can you please provide any pointers/links on this?
I see two options for you:
You want users to test your bot on Messenger:
Simply add them as testers in your bot corresponding Facebook page then ask them to look for your bot in their Messenger app.
Or you want to test your bot behaviors:
Enter botgen the chatbot generator I'm currently working on, which could help you test more publicly the bot you're working on. (assuming your bot doesn't need coding and is all about pattern conversation).
Just use the designer interface to design, run and test your chatbot.
Publish it and share it with your actual test users.

How to test Facebook apps with many users/friends?

I'm working on developing a Facebook application that accesses the user's friends list.
Since some can have thousands of friends, what's the best method to simulate this?
I want to performance test before letting it out in the wild.
Does Facebook have any sandbox account where one can create dummy accounts?
Facebook have recently implemented a feature allowing you to add up to 50 test users, it's probably not enough users to reliably test though:
http://developers.facebook.com/docs/test_users/
Why not ask a couple of users with lots of friends to beta test for you?