Beispiel #1
0
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
require_once 'ringside/api/clients/RingsideApiClients.php';
/**
 * Demonstrates how to perform identity mapping.
 *
 * @author Jason Kinner <*****@*****.**>
 */
error_log("Facebook params:");
error_log(var_export($_REQUEST, true));
$ringside = null;
if ($_REQUEST['fb_sig_nid'] == 'facebook') {
    error_log("Initializing Facebook client");
    $ringside = new RingsideApiClients('c392078dde1c96d4c019d60420fd07ab', '93694d948f9b1cf0d8567ccf7e67a860', 'http://www.facebook.com', 'http://api.facebook.com/restserver.php', 'http://68.39.18.144:8888/social');
} else {
    error_log("Initializing Ringside client");
    $ringside = new RingsideApiClients('c392078dde1c96d4c019d60420fd07ab', '93694d948f9b1cf0d8567ccf7e67a860', 'http://68.39.18.144:8888/web/', 'http://68.39.18.144:8888/api/restserver.php', 'http://68.39.18.144:8888/social');
}
// This will cause redirect if this user is not yet a principal
$ringside->require_network_login();
?>
You are principal <?php 
echo $ringside->get_network_user();
?>
 on <?php 
echo $ringside->get_network_id();
?>
<br/>
Your name on this network is <fb:name uid="loggedinuser" useyou="false"/>