Import chats from Facebook Messenger
Hi, everybody I know is leaving from facebook messenger to Telegram. Is there any way to save chats from facebook messenger into a txt file that is formatted for use in TLImporter? Thanks for making this tool!
Did you try? https://m.facebook.com/help/212802592074644/?ref=u2u
If the messages are not in a valid format, you can always reformat them yourself, much easier than copying and pasting the whole file in Telegram :).
I did try that link and it formatted it into HTML and the only other option is JSON but they are are not easy to reformat like the Whatsapp backups are.
@mikebreeezy Then I had no idea, maybe you could make an script, regex or something so it resembles WhatsApp format (or tinker around TLImporter's code to see if you can adapt it to your necessities). Otherwise I think you're out of luck, I don't use Facebook Messenger myself so I don't know any tool or way to convert them to plaintext.
I downloaded my Facebook Messenger messages through: https://m.facebook.com/help/212802592074644/?ref=u2u
And I used Microsoft Word to convert the .html into .txt, but I still failed to import the messages through TLImporter. This error message appeared as below:

I am wondering if there's something to do with the language we used in the chat. The chatting messages and our names are all in Chinese.
@ranger21515 You can't use Microsoft Word as it won't output a txt file, rather a docx or doc file with formatting.
You need to use classic notepad (search for that word in Start menu and it will appear) or a third-party tool like notepad++.
Make sure that the formatting you end up with in the txt is the same as the one provided in my samples. If it's the same, it's unlikely you will face further problems.
Have a nice day!
EDIT: Forgot to mention about the Chinese thing. No, you shouldn't have any problems as the all will handle everything UTF-8 just fine (make sure to save with that encoding while using notepad, the encoding option will appear near the "Save" button in the "Save as" dialog while saving the file). You also must make sure that the partner's names you give to TLImporter are exactly like the ones you have in the txt file, including emojis and such. Not sure if that's intentional from your side but, for example, the names that can be seen in the screenshot you provided doesn't have Chinese characters, so beware of that! :)

I just did what you've told me. I copied and pasted the message content into a Notepad and saved the file as a .txt format with UTF-8 encoding. But I still failed to import my message into Telegram through the TLIporter and got this error message as above.
I guess the problem is the layout of the message exported from Facebook Messenger. It shows like this: 'Name' 'message' 'YYYY/MM/DD' 'time'
Unlike your example given as: 'MM/DD/YYYY' 'time': 'Name': 'message'
What do you think? I'm almost about to quit but appreciate your work and patience anyway!
@ranger21515 Yes, it's a format issue: as you can see, it isn't able to locate the name of the people in the txt as it can't recognize the format provided.
You must format the messages manually or using a regex, so it looks like the sample one. Otherwise it will never work.