예제 #1
0
<?php

error_reporting(E_ALL);
ini_set("display_errors", 1);
require_once '../../FbStats.php';
include_once '../config.php';
include_once 'helper.php';
if (!session_id()) {
    session_start();
}
$fb = new FbStats($config);
$feedParams = array('sourceId' => $sourceId, 'limit' => 200, 'since' => 'last+Year');
//get Groups
try {
    $groups = $fb->getInfo('me/groups');
} catch (Exception $e) {
    echo '<div class="alert-message error">' . $e->getMessage() . '</div>';
}
?>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Facebook Groups Analytics</title>
        <link href="../css/bootstrap.min.css" rel="stylesheet" />
        <link href="../css/custom.css" rel="stylesheet" />
		
		<script src="jquery-1.7.1.min.js"></script>
		<script src="jquery.ui.core.js"></script>
		<script src="jquery.ui.widget.js"></script>
		<script src="jquery.ui.datepicker.js"></script>
예제 #2
0
<?php

error_reporting(E_ALL);
ini_set("display_errors", 1);
require_once 'lib/FbLogin.php';
include_once 'lib/config.php';
try {
    $fb = new FbStats($config);
    $user = $fb->getInfo('me');
    $_SESSION['user'] = $user;
    header("Location: question.php");
} catch (Exception $e) {
    unset($_SESSION['user']);
    echo '<div class="alert-message error">' . $e->getMessage() . '</div>';
}