How can I download all my private messages from Facebook?
I don't really want to have to scroll through the actual messages, wait for older ones to load, and copy and paste since I have 7k+ messages so far.
I'm open to any solution.
Web Applications Stack Exchange is a question and answer site for power users of web applications. It only takes a minute to sign up.
Sign up to join this communityTo download your data, log into Facebook, then click the little arrow in the top right and select "Account Settings".
In the bottom left of your "General Account Settings" find the line of text that says "Download a copy of your Facebook data" and click the link.
To start, use a computer and open the Google Chrome browser. If you don’t have Google Chrome, then download it. Then use the Google Chrome browser to go to http://m.facebook.com/messages/
Then click the person you want to see the first message with.
Now press Ctrl+Shift+J and then paste this code into the lower window that pops up, and then press Enter. It will then proceed to load old messages until it reaches the very first message. Here is the code:
setInterval(function () {
document.getElementById('see_older')
.getElementsByClassName('content')[0].click();
}, 500);
The above code can also be found on this website: http://jsfiddle.net/magicramki/k9gda3cu/
If you do not want to go back all the way, you will need to stop the script. In order to do that, you will first need to define it as a variable:
var myVar=setInterval(function () {
document.getElementById('see_older')
.getElementsByClassName('content')[0].click();
}, 500);
Then to stop it, you will simply need to enter the following command:
window.clearInterval(myVar)
You can resume the script anytime by typing the first part again.
Now once it loads everything, you have two options. You can right click anywhere on the page and choose "save as" and then save that file somewhere on your computer. Then use Google Chrome to open it when you want to view it later (won't look right in Internet Explorer). This will save the entire chat, complete with pictures and emoticons. When you want to search for a particular day, press Ctrl+F to bring up the find box. Then type in "Mar 2", for example, to bring up the conversation on March 2nd.
The second option is to highlight the parts that you want to save, and then copy by pressing Ctrl+C. Then open Microsoft Word and paste that into the document by pressing Ctrl+V. Now save that file. This will save the text and pictures, but not the emoticons.
Uncaught TypeError: Cannot read property 'getElementsByClassName' of null \n at <anonymous>:3:1
. The name of the element used in your code appears to have changed. I lack competence to find it, could you please update your code?
Sep 8, 2017 at 16:54
You can try going to http://m.facebook.com/ and click on "Messages".
Select a person to view the history, and click on "See Older Messages" once.
Notice that &start=
part in the URL, that's the number of received and sent messages minus 7.
Notice the &page_size=7
part in the URL. Currently, Facebook does not limit this number, you can set that to a number bigger than the start value. This makes it disable pagination and displays all the messages it found, except the skipped 7. (If the number's smaller, somehow Facebook will display only 7).
** To make it work on Chrome, left click on "See Older Messages" and choose "open in a new tab" and there you will find the "page_size=" number to change. (May 2013)
start
and page_size
URL parameters - the URL is completely different. Firefox shows them, but changing page_size
seems to have no effect - I still see only a few messages at a time.
page_size
parameter is no longer present for all three browsers (Firefox, IE and Chrome)
I use a tool called SocialSafe that backs up all of (well, pretty much all of) my Facebook content, and that now includes messages. I can search through them all, and also jump see in the little diary part of it all of the different things that I've done on Facebook over the years.
Download a copy of your Facebook data: click the little arrow in the top right and select "Account Settings". Then find the line of text that says "Download a copy of your Facebook data" and click the link.
I wrote a handy python script called mesExtractor that help you extract any conversation in your Facebook data. Using this script, I'm able to extract 60k+ messages in one conversation of my Facebook data. See the demo from github here:
If you use Chrome, I have an extension just for this purpose.
Here is the link Messages Saver for Facebook.
I didn't try the really big chats, but what I have (up to 15,000 messages) it saves. You can also save in parts.
You can choose whether to save your chat as just text, an html file with all smileys, emojis, pictures and other files embedded, or as a zip file, then all the files will be saved locally to your computer.
There is an add-on for Firefox which downloads your facebook inbox and saves it in txt files. Take a look here: https://addons.mozilla.org/en-US/firefox/addon/red1/ or here: http://www.facebook.com/Red1MessageArchiver
Just go to your browsers menu and click "save as" while you're on the page with the messages. Make sure all the messages are showing by clicking to load them each time, until you have scrolled back to the beginning. This will save the entire web page, including your pictures and you will be able to scroll through the message exactly like the original on Facebook. Hope this helps!