Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # NOTICE: This Bash script is currently unable to dump your entire profile. I am
- # reading this page...
- # https://developers.facebook.com/docs/graph-api/using-graph-api/v2.2#fieldexpansion
- #
- # I think I need to loop through something the FB devs call "pagination" to grab
- # my profile in separate segments. I will delete this notice once all is fine. If
- # you figure it out before me, feel free to provide me with the knowledge.
- #################### README ####################
- # Filename: fb_dump.sh
- # Latest ver': https://pastebin.com/884g3K9x
- # Contact: https://pastebin.com/message_compose?to=J2897
- #
- # This script will dump your Facebook profile data to a file.
- #
- # If you're leaving Facebook, this should be useful for those wishing to migrate
- # their raw data.
- #
- # I started thinking of this when the Facebook staff/moderators or bots/algorithm
- # began bullying me into using my so called "real name". Even though no one has
- # any way of verifying my real name, they still insist that I use it.
- #
- # The only data I have on Facebook that I would like to keep is my Notes, the
- # Links I have posted, and perhaps a few, long, Status Updates I have typed.
- #
- # I tried a proprietary program called 'Social Safe'. It dumped my entire profile
- # to a PDF successfully. But when I tried dumping to the CSV format, it failed to
- # export the Links. It also doesn't currently export Notes either; and that's why
- # I felt the need to create my own alternative - FB Dump.
- #
- # After dumping my profile, I hope to recreate it in something not controlled by
- # the corporate spyware industry. Freenet or Diaspora seems more suitable for a
- # democratic society...
- # https://freenetproject.org/
- # http://www.kickstarter.com/projects/196017994/diaspora-the-personally-controlled-do-it-all-distr
- #
- #
- # How to use FB Dump:
- #
- # 1. Set your FB ID.
- # 2. Uncomment one of the FIELDS.
- # 3. Set the ACCESS_TOKEN.
- # 4. Set your desired OUTPUT path correctly.
- #
- #################### README ####################
- # https://graph.facebook.com/<USERNAME>
- ID="10151981746917553"
- # https://developers.facebook.com/docs/graph-api/reference/v2.2/user/feed
- #FIELDS="links" # shows only the links that were published by this person.
- #FIELDS="posts" # shows only the posts that were published by this person.
- #FIELDS="statuses" # shows only the status update posts that were published by this person.
- #FIELDS="tagged" # shows only the posts that this person was tagged in.
- FIELDS="feed"
- # https://developers.facebook.com/tools/explorer/
- ACCESS_TOKEN="CAACEgEose0cBALVc3hNxZBmB9VG2IM2V7oehsmat3bmIF6Iufv5GppLKFOYKPHHV3WutZBmZAUwu1B0PRZBaAZCUDZCZAjfziksvTMKH0Q6hGNCvT8hCvzSB5ZCYzjownG1UMF5nri8TCxYFt7QOoLDB5ZCF3doMJZAguUQPNMmoa1G01garv4c36vO0IasOnyF6F2KEukHQOW1QWkGcUoPjFr"
- # http://www.useragentstring.com/pages/Mozilla/
- USER_AGENT="Mozilla/5.0 (Windows; U; Windows NT 6.1; rv:2.2) Gecko/20110201"
- OUTPUT="/cygdrive/c/Users/John/Code/SH/fb_dump/$FIELDS.dat"
- # http://open-source-tricks.blogspot.co.uk/2013/04/backup-facebook.html
- # http://curl.haxx.se/docs/manpage.html
- #curl --user-agent "$USER_AGENT" --output "$OUTPUT" "https://graph.facebook.com/$ID?fields=$FIELDS&access_token=$ACCESS_TOKEN" -s
- # http://www.gnu.org/software/wget/manual/
- wget --no-verbose --output-document="$OUTPUT" --user-agent="$USER_AGENT" "https://graph.facebook.com/$ID?fields=$FIELDS&access_token=$ACCESS_TOKEN"
Add Comment
Please, Sign In to add comment