Samsara Web Design & Optimisation
Random header image... Refresh for more!

Delete Facebook Messages

Bookmark and Share

If you’ve made it here you have probably been searching for a method to delete all your stored messages in Facebook now that they have decided by default to keep a copy of all your messages and chats. Facebook has not only failed to offer an option not to keep a copy of these messages or an easy method to delete them for some reason they feel it is for them to choose to store a copy on their servers and make it hard remove them.

Please note the code below no longer works due to Facebook making changes to their code. New code is here .. Delete Facebook Messages From Inbox

In my personal effort to remove as much data from Facebook as possible (after listening to the Julian Assage interview about Facebook’s links to and access given to US government departments) I decided to delete all my old messages. Whilst I have nothing to hide, it begs the question why do they need open access to all our personal data?

More background information here

Having used iMacros before to delete all my old wall posts I decided this would be a suitable method. I hit a stumbling block pretty early on however we managed to find a workaround that really works.

The problem was Facebook has all the links for opening each archived message as unique links to be clicked. The iMacro would not initially handle these automatically as (after recording the sequence in iMacros) it goes back to look for the previous deleted link. We got around this by sending the iMacros script to look for the next vowel within a link. With some more editing of the code we now have (until Facebook changes everything again) a working script to use in iMacros that automatically deletes all your archived messages. It runs in a cycle deleting the messages one at a time so it is easy to stop the deletions at any time.

To be sure not to delete any messages you wish to keep, ensure you have your messages you wish to retain in either your ‘inbox’ or ‘other’ folder within the messages area.

Get the code here.. Delete Facebook Messages using iMacro

The steps then required are: -
Go to Messages Inbox
Move individual messages to archive folder by pressing the ‘x’ on the right hand side (It is very fast and easy to go through your messages with one click for each)
Go to Messages Archived Folder
Run iMacro script

11 comments

1 Melissa { 06.15.11 at 9:03 pm }

I tried to do this and I could not get it to work. I followed the instructions and even tried doing it numerous times, even trying to re-save the code in a new file. I’m not sure if this is a scam or not but if it truly does work I would really like to know how to get it to work correctly.

Thanks

2 365 { 06.16.11 at 9:54 am }

Hi Melissa
Totally genuine! I shared this after it took me ages to come up with a solution. The steps to follow are..
1. Use Firefox as your Internet browser
2. Add the add-on “iMacros” to Firefox
3. Copy and paste the code into an iMacro file and save it with a new name
4. Double Click the iMacro file in the list or click once and then press play.
5. It should then go to your archived messages folder and delete the messages. You will see it running, if it fails again please let me know the point where the window stops and/or the error code in the iMacros panel.

I just tested it again and got an error, so I have altered the code slightly so that the iMacro ignores the errors.
Repasting the modified code in the other page now!

3 Al Anon { 06.21.11 at 8:49 pm }

I tried it too, the script runs without error, but all the messages are still there

4 365 { 06.21.11 at 9:53 pm }

Is that when you are on the messages archive page? If you are on that page with some archived messages it should cycle through them. Still works for me

5 W { 06.29.11 at 1:12 pm }

The script does run but does not delete any messages.
At some random instances, it takes you to the conversation page and then goes back to the archive page but without actually deleting any message

6 365 { 06.29.11 at 1:54 pm }

Had to make a couple of fixes. Found the error that where it could be breaking. The one that is on this page is working.. http://www.samsaraweb.com/web-pc-help/imacro-code-to-delete-facebook-messages/
Please could I ask you to try again and report back?

7 W { 07.05.11 at 9:08 am }

Still the same, nothing has changed… it is not actually deleting any message, not even one…
what is the solution ?

8 W { 07.08.11 at 12:18 am }

Hi,

any luck ?

9 Otir { 07.09.11 at 7:55 pm }

Got here because you answered me on Quora, and I really appreciate the thorough explanation; I will study the procedure at leisure! Thanks again.

10 Serkan { 08.24.11 at 11:44 am }

I got it working using the following code:

VERSION BUILD=7220523 RECORDER=FX
TAG POS=1 TYPE=A ATTR=HREF:https://www.facebook.com/messages/?query=is%3Aarchived&action=read&tid*
SET !ERRORIGNORE YES
WAIT SECONDS=1
TAG POS=1 TYPE=SPAN ATTR=TXT:Actions
TAG POS=1 TYPE=SPAN ATTR=TXT:Deletemessages…
TAG POS=1 TYPE=SPAN ATTR=TXT:Deleteall
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:BUTTON ATTR=NAME:delete&&VALUE:Deleteconversation
WAIT SECONDS=2

Apparently the wildcards with *a* don’t work for me, which is why the whole script failed. Instead I used part of the URL for archived messages to select the link, and the rest was a bit of fine-tuning. I also changed the default time-out of 60seconds to a much smaller value. Runs smoothly now.

11 365 { 08.24.11 at 7:17 pm }

It appears there is some tinkering to be done depending on the message URLs and version of iMacros. Itis stil working for me.
Pleased to hear you got yours working Serkan and thanks for sharing.

Leave a Comment