It takes two args, the message number (as given out by fbcmd inbox) and the message itself. pretty straightforward. Just throwing it out there.
it's meant to be used with fbcmd, but if you like you can provide a thread_id to it as well (slight mod might be needed)
#!/usr/bin/perl use strict; use WWW::Mechanize; use HTTP::Cookies; my $username = 'youremail'; my $password = 'yourpass'; my $maildata = "/home/youruser/.fbcmd/maildata.txt"; my $msgid=`php -r \"\\\$ld=unserialize(file_get_contents('$maildata'));print \\\$ld['ids'][$ARGV[0]];\"`; my $mech = WWW::Mechanize->new(); $mech->cookie_jar(HTTP::Cookies->new()); $mech->get("http://lite.facebook.com/login/"); $mech->submit_form(form_number => 1,fields =>{email=>$username,password=>$password}); $mech->content() =~ /\/w\/(\w+)\/logout/; $mech->post("http://lite.facebook.com/w/".$1."/inbox/reply/".$msgid."/",{message=>$ARGV[1],__async__=>'true'});
4 Comments:
tested.works.
you have too much time
yes I do
up: does not work since facebook disabled their "Facebook lite" service.
Post a Comment