- observation: soon as i have include_once('facebook.php') the page blacks out - ie nothing shows.. i usually only included this once the app was ready to upload to fan page - could this be blocking something? causing the problem?
anyway ->
i have an app thats been working online. Im now trying to run it local and its not working.
App namespace is webcampost - i presume this is what is referred to below as app name allows spaces?
Ive setup as per this link using my webcampost for the folder name (without the :8888 though): Running Facebook application on localhost and virtual host to this: http://sawmac.com/xampp/virtualhosts/
url:http://webcampost.com/index.php (i have to specify index.php because dir listing is on in apache)
canvas url: http://webcampost.com/ & https://webcampost.com/ (<-- wont fb go looking for this online:?)
suely im ok if i specify localhost.com instead of using the virtual hosts?? I have an entry for that in my hosts file..
but its not working. the pic doesnt make i to the fan page.. the paths are relative - could there be an issue with paths from localhost to the online fanpage?
ive tried just http://localhost.com/webcamapp/ (without the virtual hosts) and also no luck, its like the webcam is stopping short soon as i click "upload to facebook".
I presume i need to gen a new token after change the URI to the local domain or not?
whats even stranger now is i cant revert BACK to my live domains! i just get a blank page - as if facebok has now leetched onto localhost and i cant revert back to my live url's!! ive even tried in another browser but no luck.
vhosts code:
NameVirtualHost *
DocumentRoot "C:\xampp\htdocs" ServerName localhost.com
DocumentRoot "C:\xampp\htdocs\webcampost" ServerName webcampost.com Order allow,deny Allow from all
app:
$pic="uploads/$name.jpg";
$params = array(
// this is the access token for Fan Page
"access_token" => "$accesstoken",
"message" => "You have been entered into the competition!",
"source" => "@" . "$pic", // ATTENTION give the PATH not URL
//"picture" => "http://www.ifinity.co.za/webcam/boom/photo.png",
);
error_reporting(0);
try {
// path contains Facebook id of Fan page
$ret = $fb->api('/225400744290290/photos', 'POST', $params);
# echo '<span style="color:e3e3e3;">Photo successfully uploaded to Facebook Album / Redirect to main page</span>';
}