Hi, I’ve modified the Mini Bot Class, I’ve fixed the Facebook status update and I’ve implemented the function to post on the wall of a facebook page: suppose you have a page of a brand, and you need to update it regularly with a cron job… Very, very usefull, isn’t it?
Nothing more to say. Just download the class from Mini Bot Class page and search for setFacebookStatus method and postToFacebookPage method.
Many thanks, looking like such a simple and effective solution.
My example use:
define (‘FACEBOOK_EMAIL_LOGIN’, ‘xxxxx’);
define (‘FACEBOOK_PASSWORD’, ‘yyyyy’);
define (‘FACEBOOK_DEBUG’, false);
require_once ‘includes / minibots.class.php’;
$ M = new Minibots ();
if (isset ($ _GET [‘status’])) (
$ M-> setFacebookStatus ($ _GET [‘status’], FACEBOOK_EMAIL_LOGIN, FACEBOOK_PASSWORD, FACEBOOK_DEBUG);
)
if (isset ($ _GET [‘post’])) (
$ M-> postToFacebookPage ($ _GET [‘post’], ‘wall.php’ FACEBOOK_EMAIL_LOGIN, FACEBOOK_PASSWORD, FACEBOOK_DEBUG);
)
Howdy,
Nice work, I like it.
A couple of points. The Facebook Page status update is currently marred by the fact that the Facebook mobile site seems to (incorrectly?) post messages to your own wall, not the page. The action in the form is always /home.php rather than the page URL.
It may be further complicated by the different permissions – an owner, vs someone who just ‘likes’ a page.
Also, you’re using cookies but you’re not actually saving/reusing them – curl only sets cookies once you curl_close($ch)
I’ll let you know when I’ve found a fix for the Facebook Page posting.
not work….