Beispiel #1
0
 public static function init()
 {
     if (!Social_Client::$finish) {
         Social_Client::$finish = true;
         try {
             require_once realpath(dirname(__FILE__)) . "/Session.php";
             $session = new Social_Session();
             if (!$session->get("sa_config")) {
                 header("HTTP/1.0 404 Not Found");
                 die("Direct access not allowed");
                 Social_Logger::error("Direct access not allowed, ");
             }
             Social_Auth::init($session->get("sa_config"));
         } catch (Exception $e) {
             Social_Logger::error("Error occured while Social_Auth init");
             header("HTTP/1.0 404 Not Found");
             die("Error occured!");
         }
     }
 }
Beispiel #2
0
<?php

/**
 * All the callback request will be handled here
 */
require_once "Social/Auth.php";
require_once "Social/Client.php";
Social_Client::handle();