Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

catch no config.json file

  • Loading branch information...
commit 8c61b99ec120a4c26ed42f22b9a6e9d8708feca0 1 parent e47ba9a
@towski towski authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 index.php
View
9 index.php
@@ -1,6 +1,11 @@
<?php
error_reporting(E_ALL);
-$config = json_decode(file_get_contents('config.json'), true);
+if(file_exists('config.json')){
+ $config = json_decode(file_get_contents('config.json'), true);
+} else {
+ print("put credentials in config.json");
+ die();
+}
if (isset($_REQUEST['platform']) && $_REQUEST['platform'] == "fb") {
require_once("FacebookPlatform.php");
$platform = new FacebookPlatform($config['facebook']);
@@ -27,4 +32,4 @@
<?php }?>
<?= $platform->getFriends(); ?>
<?= $platform->displayFooter(); ?>
-</body>
+</body>
Please sign in to comment.
Something went wrong with that request. Please try again.