My old non-smart phone doesn't support GROUP facebook chat, so I was trying to find a way to scrape facebook GROUP messages and send them as text messages to the phone. I know some amount of Perl webscraping (HTML::TableExtract,WWW::Mechanize, LWP, the like) but I wasn't able to infiltrate facebook even when I provided my script my username and password.
Is there any way to get such a web scraper to work? Any APIs or toolkits I should look at? I'm not quite sure how to get started on this project. At worst, I could try to write a macro that copies text from certain locations on my browser....
edit: A cookie jar sounds like a good idea, I'll look into it. Here's a snippet of (bad) code.
open(PERSONAL, "personal.txt");
my @pers = <PERSONAL>;
$ua -> get($cur_url);
$ua -> form_id("login_form");
chomp($pers[0]);
$ua -> field("email", $pers[0]);
chomp($pers[1]);
$ua -> field("pass", $pers[1]);
$ua -> click_button(value =>"Log In");
$ua -> get("https://m.facebook.com/groups/170930939594231/");
$ua -> save_content($dir."/group.html");
Please use the xmpp API facebook provides. No need to scrape things.