I just had to do the very same thing, except instead of Facebook, it was a contact list in a proprietary medical office database. Since my programming skills are limited to Basic and Pascal, I just used AutoHotKey and the AutoHotKey Recorder. After a little editing, i.e. adding a test for empty boxes and putting the whole script in a loop, it was working fine.
I considered teaching myself Ruby, but I knew it would be much faster to use AutoHotKey.
But it's really interesting to see the same process in a proper computer language