i want to create an application in friendster..
heres my code:
index.php
<?php
require_once(dirname(__FILE__). '/lib/FriendsterAPI.php');
// TO DO: Enter your secret key below
define('T_SECRET', 'f0ce8960ce76e39193ef43bea42f8a97');
define('T_CSS_STYLE', ' style=" height: 120px; background-color: #111111! important; overflow: hidden; margin: 0 auto; "');
// GET parameters from callback URL
$user_id = $_REQUEST['user_id'];
$api_key = $_REQUEST['api_key'];
$session_key = isset($_REQUEST['session_key'])? $_REQUEST['session_key'] : null;
$auth_token = isset($_REQUEST['auth_token'])? $_REQUEST['auth_token'] : null;
try {
// Validate the request was really constructed and sent by Friendster
FriendsterAPI::validateSignature(T_SECRET);
// Access friendster API
if ( $session_key != null ) {
$fapi = new FriendsterAPI($api_key, T_SECRET, $session_key);
}
else {
$fapi = new FriendsterAPI($api_key, T_SECRET);
$session_key = $fapi->session($auth_token);
$_GET['session_key'] = $session_key;
}
// Access user info from friendster API
$user_info = $fapi->users($user_id);
$user_info = $user_info[0];
// Update content in user profile
if ( isset($_POST['updateapp']) ) {
$fapi->post_widget($content);
$params = array();
$fapi->redirectToProfile($user_id, $params);
exit;
}
?>
<body bgcolor=#111111>
<form action="index2.php" method="post">
<input type="textbox" name="fs" value="css url here"><br>
<input type="submit" name="updateapp" value="update my profile"><br>
</form>
<?
} catch (FriendsterAPIException $e){
echo 'Error: ' . $e->getMessage() . '<br/><br/>';
echo $e->getTraceAsString();
exit;
}
?>
index2.php
<?php
$link = $_POST['fs'];
echo "<link rel='stylesheet' href='".$link."'>";
?>
idk what code should i add in index2.php to load css in my profile ..
can anyone help me pls?