How can I log into Facebook without a login form?
I've created an application which posts wall posts to one of my pages automatically (with a cron job).
But it needs login. I've done everything with the PHP SDK 3.1 and it works if I am logged into Facebook by my browser. But it does not work on my hosting and this is important for me because it is "scheduled auto poster".
Is it possible with the PHP SDK or JavaScript SDK or anything?
PS: Logging in with cURL does not work (code: http://www.daniweb.com/web-development/php/code/290893
).
I use PHP SDK 3.1.
Here is my code:
require 'sdk/facebook.php';
$facebook = new Facebook(array(
'appId' => $bilgi_appID,
'secret' => $bilgi_appSecret,
'fileUpload' => true,
'cookie' => true // enable optional cookie support
));
$facebook->setFileUploadSupport(true);
$args = array(
'message' => $bilgi_fotoMesaji,
"access_token" => $access_token,
"image" => $file
);
$data = $facebook->api('/'.$bilgi_sayfaninAlbumIDsi.'/photos', 'post', $args);
if ($data)
print_r("basariyla yuklendi...");
This works when I am logged in Facebook.
But how can I post a photo or post while I am logged out? It redirects login page.