0
  • 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>';
    }
Community
  • 1
  • 1
FstaRocka
  • 278
  • 1
  • 2
  • 15
  • "Blank page" usually means a fatal error - so go check your error logs. – CBroe Oct 23 '13 at 08:37
  • im not getting any errors via php and its set to E_ALL -> I cleared apache log and i get some ssl errors. do i need ssl locally to run? i would imagine since the one canvas url is https://localhost - could it be my ssl setup? – FstaRocka Oct 23 '13 at 10:09
  • You will need SSL for a canvas app (unless it is still in sandbox mode, and if you don’t use SSL while developing you have to make sure you access facebook.com via HTTP also). But this does not seem to be the problem here, if your “blank page” only happens once you include the PHP SDK. Have you checked the actual error.log? – CBroe Oct 23 '13 at 10:14
  • ive poked around - im not quite sure if i need the canvas? might be a ssl thing i need on local machine? perhaps fb is stopping if there is no ssl.. im struggling with it now - just very odd. – FstaRocka Oct 23 '13 at 11:50
  • Nope, the PHP SDK does not care if the page it is embedded in is access using SSL or not. Have you checked the actual error.log by now? – CBroe Oct 23 '13 at 11:57
  • u mean the apache one? yes - unless im not fidlding with ssl stuff- it seems fine.. – FstaRocka Oct 23 '13 at 12:35
  • Check the PHP error log as well. – CBroe Oct 23 '13 at 12:45
  • Are you sure you are checking the _correct_ logfiles …? (In case you might have several different locations in your web server setup.) – CBroe Oct 23 '13 at 13:14
  • i downloaded base_facebook.php from github and saved it to the loacl dir (live dir never had/needed this file to work) now at least page is showing - . whats totally weird is i cnt change the uri to the original live domain! i just get a white page on fb dev ?!! man this fb stuff is such a mess – FstaRocka Oct 23 '13 at 13:19
  • No, it’s not a mess, most of it is quite straight forward. And btw., by publishing a post with a message the user did not enter himself, you are violating Platform Policies. – CBroe Oct 23 '13 at 14:46

0 Answers0