Hello dzordzs,
Thanks for asking the Apple Support Communities for help with being asked to download Facebook Messenger when sharing from apps.
I recommend deleting the Messenger app, and then redownloading it from the App Store to ensure the version you have is updated and doesn't have issues.
1. Use this article to delete the app: How to delete apps on your iPhone, iPad, and iPod touch - Apple Support
2. Then, restart your iPhone: Restart your iPhone - Apple Support
3. Then you can use this article to reinstall the app from the App Store: Redownload apps, music, movies, TV shows, and books - Apple Support
4. If you need more help, I recommend reinstalling iOS. Before reinstalling you should make a backup of your data. You can make a backup in iCloud or iTunes using this article: How to back up your iPhone, iPad, and iPod touch - Apple Support
5. After your data is backed up, you can reinstall iOS using iTunes. The reason we need to use iTunes for this step is to get a new copy of iOS installed to your device. Use this article to reinstall the iOS: If you can‘t update or restore your iPhone, iPad, or iPod touch - Apple Support
Please pay close attention when you reach step 4. Once iOS is reinstalled, test if the issue is still occurring. Thanks again and have a great rest of your day.