dadamssg Posted August 23, 2009 Share Posted August 23, 2009 does anyone know how to do this? i've googled it for a bit but only found one re-occurring script that doesn't work. it's as follows <?PHP /******************************* * Facebook Status Updater * Christian Flickinger * http://nexdot.net/blog * April 20, 2007 *******************************/ $status = 'my_status'; $first_name = 'your_first_name'; $login_email = 'your_email'; $login_pass = 'your_password'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://login.facebook.com/login.php?m&next=http%3A%2F%2Fm.facebook.com%2Fhome.php'); curl_setopt($ch, CURLOPT_POSTFIELDS,'email='.urlencode($login_email).'&pass='.urlencode($login_pass).'&login=Login'); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_COOKIEJAR, "my_cookies.txt"); curl_setopt($ch, CURLOPT_COOKIEFILE, "my_cookies.txt"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3"); curl_exec($ch); curl_setopt($ch, CURLOPT_POST, 0); curl_setopt($ch, CURLOPT_URL, 'http://m.facebook.com/home.php'); $page = curl_exec($ch); curl_setopt($ch, CURLOPT_POST, 1); preg_match('/name="post_form_id" value="(.*)" \/>'.ucfirst($first_name).'/', $page, $form_id); curl_setopt($ch, CURLOPT_POSTFIELDS,'post_form_id='.$form_id[1].'&status='.urlencode($status).'&update=Update'); curl_setopt($ch, CURLOPT_URL, 'http://m.facebook.com/home.php'); curl_exec($ch); ?> Quote Link to comment https://forums.phpfreaks.com/topic/171541-update-facebook-using-curl/ Share on other sites More sharing options...
corbin Posted August 23, 2009 Share Posted August 23, 2009 You could get something like Firefox's LiveHTTPHeaders plugin and use it to see exactly what is sent to facebook in the process of a status change then simply recreate the steps. Quote Link to comment https://forums.phpfreaks.com/topic/171541-update-facebook-using-curl/#findComment-904652 Share on other sites More sharing options...
dadamssg Posted August 23, 2009 Author Share Posted August 23, 2009 yeah i just downloaded the plug in...i have no idea what i'm looking for though Quote Link to comment https://forums.phpfreaks.com/topic/171541-update-facebook-using-curl/#findComment-904657 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.