Esempio n. 1
0
 public function getContacts($user, $password, $provider)
 {
     if (!$user || !$password) {
         return false;
     }
     if (!isset($this->inviterObj) || !is_object($this->inviterObj)) {
         $this->inviterObj = new OpenInviter();
     }
     $this->inviterObj->startPlugin($provider);
     $this->inviterObj->login($user, $password);
     $contacts = $this->inviterObj->getMyContacts();
     $error = $this->inviterObj->getInternalError();
     return $contacts;
 }
Esempio n. 2
0
<?php

require_once 'class_facebook/facebook.php';
$entry = new facebook();
$message = strip_tags($_POST['newentry']);
$entry->insert_entry($message);
Esempio n. 3
0
<?php

require_once 'class_facebook/facebook.php';
$nuevo = new facebook();
$comment = $_POST['comment'];
$id_message = $_POST['id_message'];
$nuevo->load_comments_ajax($id_message, $comment);
Esempio n. 4
0
<?php

include "facebook/facebook.php";
include "include/config.php";
$faceBookObj = new facebook(array('appId' => FACEBOOK_APP_ID, 'secret' => FACEBOOK_SECRET_KEY));
$fbUser = $faceBookObj->getUser();
$accessToken = $faceBookObj->getAccessToken();
if (!empty($accessToken)) {
    try {
        //get facebook likes
        //$session = $helper->getSessionFromRedirect();
        //$request = new FacebookRequest($session, 'GET', '/me');
        //Todo save likes in db
    } catch (Exception $e) {
        echo $e;
    }
}
Esempio n. 5
0
?>

<div class="tablecell content both-border">
	<div class="pad">
<?php 
bigtitle();
/*If account creation is closed, do not show the page!*/
if ($account_creation_closed) {
    die("Server Is Currently Closed To New Players");
}
##
##
## New Registration Process
##
##
$facebook = new facebook(array('appId' => FB_ID, 'secret' => FB_SECRET));
$request = $facebook->getSignedRequest();
if ($request) {
    $register = $request['registration'];
    try {
        $db = db::init();
        $fbId = isset($request['user_id']) ? $request['user_id'] : 0;
        $user = new user();
        if ($fbId != 0) {
            if ($user->fbLogin($fbId)) {
                /*They have account, throw them back to the main page*/
                header('Location: index.php');
                exit;
            }
        }
        $sth = $db->prepare("SELECT * FROM " . $db_prefix . "account WHERE username = ?");
Esempio n. 6
0
Load the website class auto loader into the 
*/
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/auto.php';
include $_SERVER['DOCUMENT_ROOT'] . "/config/config.php";
header("Content-type: text/html; charset=utf-8");
header("X-UA-Compatible: IE=Edge, chrome=1");
header("Cache-Control: public");
// Tell the client (and any caches) that this information can be stored in public caches.
header("Connection: Keep-Alive");
// Tell the client to keep going until it gets all data, please.
header("Vary: Accept-Encoding, Accept-Language");
header("Keep-Alive: timeout=15, max=100");
if (!isset($body_class)) {
    $body_class = "bnt";
}
$facebook = new facebook(array('appId' => FB_ID, 'secret' => FB_SECRET));
?>
<!DOCTYPE html>
<html lang="<?php 
echo $l->get('l_lang_attribute');
?>
">
<head>
<meta charset="utf-8">
<meta name="Description" content="Xenobe Rage - A free online game - Open source, web game, with multiplayer space exploration">
<meta name="Keywords" content="Free, online, game, Open source, web game, multiplayer, space, exploration, blacknova, traders, xenobe rage, xr, xenobe">
<meta name="Rating" content="General">
<link rel="shortcut icon" href="images/bntfavicon.ico">
<title>Xenobe Rage</title>
<link rel='stylesheet' type='text/css' href='templates/alienrage/styles/main.css'>
<link rel='stylesheet' type='text/css' href='templates/alienrage/styles/styles.css'>
Esempio n. 7
0
<?php

require_once 'class_facebook/facebook.php';
$logout = new facebook();
$logout->logout();
Esempio n. 8
0
require_once 'class_facebook/facebook.php';
if ($_SESSION['username'] == "") {
    header('Location: login.php');
}
include 'header.php';
?>

<a href="logout.php" id="log_out">Logout</a>
<span id="welcome">Welcome <?php 
echo $_SESSION['username'];
?>
</span>
    <div class="grid_12"><br>
<?php 
//instanciamos la clase facebook y creamos el avatar
$nuevo = new facebook();
$ema = $_SESSION['email'];
$gravatar = $nuevo->get_gravatar($ema);
?>
    <!--formulario para crear nuevas entradas-->
    <div class="grid_7 push_2" id="form_messages">
        <h1>Escribe algo</h1>
        <form method="post" action="new_entry.php">
            <textarea name="newentry" class="comment" cols="44" rows="2" maxlength="250"  id="newentry"></textarea>
            <br />
            <input type="submit"  value="Create new entry" class="send_entry"/>
        </form>
    </div><br><br><br>
    <div class="newscomments" id="other_comments" style="margin-top: 12px"></div><br>
<?php 
//recorremos los mensajes y los comentarios
Esempio n. 9
0
 public function getFacebookLikesNum()
 {
     return \facebook::get_likes_num();
 }
Esempio n. 10
0
<?php

require_once 'class_facebook/facebook.php';
include 'header.php';
$login = new facebook();
if (isset($_POST['login'])) {
    $email = strip_tags($_POST['email']);
    $password = strip_tags($_POST['password']);
    $login->login($email, $password);
}
?>
<div class="grid_6 push_3" id="caja_login">
    <h1>Sistema de comentarios como facebook</h1>
    <div id="login">
    <form action="login.php" method="post">
    <label>Email</label><input type="email" name="email" id="email" required /><br>
    <label>Password</label><input type="password" name="password" id="password" required /><br>
    <input type="submit" name="login" id="logi" />
    </form>
    </div>
</div>

<?php 
include 'footer.php';
Esempio n. 11
0
<?php

include "include/config.php";
include 'facebook/facebook.php';
$faceBookObj = new facebook(array('appId' => FACEBOOK_APP_ID, 'secret' => FACEBOOK_SECRET_KEY));
if (isset($_POST['Login'])) {
    $hostname = "http://indfas.alice.com/";
    $loginUrl = $faceBookObj->getLoginUrl(array('redirect_uri' => $hostname . "facebookResponse.php", 'cancel_uri' => 'cancel.php', 'scope' => 'email'));
    //redirect to facebook login page
    header('Location: ' . $loginUrl);
}
?>
<div>
<form action="login.php" method="post">
Facebook login Page
Click login button
<input type="submit" name="Login" value="Login">
</form>
</div>

Esempio n. 12
0
<?php

include "classes/facebook.class.php";
$page_id = "162896513752848";
$facebook = new facebook();
$int = filter_var($page_id, FILTER_SANITIZE_NUMBER_INT);
$data = $facebook->parse($int);
foreach ($data as $entry) {
    echo "<h2>{$entry->title}</h2>";
    $published = date("g:i A F j, Y", strtotime($entry->published));
    echo "<small>{$published}</small>";
    echo "<p>{$entry->content}</p>";
    echo "<hr />";
}