Extract Messages and Contacts from Facebook / Facebook Messenger Android Apps

This Python script connects to the given "threads_db2" and "contacts_db2" SQLite files and runs queries to extract the stored contacts and messages.
It then sorts/outputs these values to the command line and optionally to the nominated Tab Separated Variable files.
The script converts the "timestamp_ms" column values into the form YYYY-MM-DDThh:mm:ss.
If a message has latitude/longitude data, it will also provide a plot of the position via a GoogleMaps URL. The message text and timestamp are also included on the plot.

Please refer to http://cheeky4n6monkey.blogspot.com/2014/01/facebook-facebook-messenger-android-app.html for further details.