anger management part 2 peeps!
A nice simple bash script to update the status on facebook from the command line. Pretty straight forward, using cURL here again. As usual, edit the email and passord. Script takes one argument, the status. There's no error-checking so there really isn't a way to know if it was successful or not. I'll add that in sometime later.
I love cURL!
edit: some installation instructions for the younger peeps
and that should do it.
A nice simple bash script to update the status on facebook from the command line. Pretty straight forward, using cURL here again. As usual, edit the email and passord. Script takes one argument, the status. There's no error-checking so there really isn't a way to know if it was successful or not. I'll add that in sometime later.
I love cURL!
edit: some installation instructions for the younger peeps
1) copy past it into a new file on the desktop say fbupdater
2) open terminal, type "sudo cp /Desktop/fbupdater /usr/local/bin/fbupdater"
3) type "chmod a+x /usr/local/bin/fbupdater"
and that should do it.
#!/bin/bash
email=YOUR-EMAIL
pass=YOUR-PASSWORD
stat=$1
cd $HOME
echo "logging in"
pfID=`curl -L --silent -A "MOZILLA/5.0" -b cookie -c cookie -d "email=${email}" \
-d "pass=${pass}" -d "login=Log+In" http://m.facebook.com/login.php | \
sed -nr 's/.*post_form_id" value="(\w+)".*/\1/p'`
echo "updating"
curl --silent -L -A "MOZILLA/5.0" -b cookie -c cookie -d "post_form_id=${pfID}" \
-d "status=${stat}" -d "update=Update" http://m.facebook.com/home.php > /dev/null
if [ -e cookie ]
then
rm cookie
else
echo "no cookie file? something went wrong?"
fi
9 Comments:
Doesn't work with the new Facebook.
Dosent work.
Can you post an update.
I would recommend using FBCMD for all command line interaction with facebook.
:bump: how can haz updates with teh command lines?
has http://fbcmd.dtompkins.com/
There is a new script for that:
http://360percents.com/posts/bash-script-to-update-facebook-status-linux-mac-os-x/
doesnt work mate
This was posted ages ago. Facebook has undergone some significant changes since then.
http://www.systmbx.com/scripts/bash-script-to-update-facebook-status-from-command-line
Post a Comment