include_once 'lib.php'; include_once 'config.php'; $fb = FB::get($api_key, $secret); //$friends = $fb->api_client->friends_get(); $user = $_POST['fb_sig_user']; $friends = explode(",", $_POST['fb_sig_friends']); if (isset($_POST['what'])) { $who = $user; $what = $_POST['what']; $description = $_POST['description']; $value = $_POST['value']; $available = (bool) false; if ($_POST['available'] == 1) { $available = (bool) true; } add_shared_item($who, $what, $description, $value, $available); $render_msg = (bool) true; } echo render_menu("my_listings", $user, $friends); echo render_tabs(0); if ($render_msg) { ?> <fb:success> <fb:message>Your shared item has been added.</fb:message> </fb:success> <?php } ?> <div style="background-color: white; border: 1px solid black; margin: 10px"> <table style="width: 100%">
include_once 'client/facebook.php'; include_once 'lib.php'; include_once 'config.php'; // initialize facebook app $fb = FB::get($api_key, $secret); $users = array("patrice" => 517441138, "james" => 403902, "greg" => 509984051, "josh" => 501799772); add_friend_limit($users["greg"], $users["patrice"], 1000); add_friend_limit($users["josh"], $users["patrice"], 50); add_friend_limit($users["james"], $users["patrice"], -1); add_shared_item($users["patrice"], "Subaru Outback", "This thing is totally beat up.", 10000.0); add_shared_item($users["patrice"], "Ruby On Rails Book", "Agile Web Development with Ruby on Rails.", 15.0); add_shared_item($users["patrice"], "Snowboard", "10 year old snowboard; pretty beat up.", 150.0); add_shared_item($users["patrice"], "Electic Guitar", "Epiphone Les Paul electric guitar.", 75.0); add_shared_item($users["greg"], "Canadian Flag", "Oh Canada", 10.0); add_shared_item($users["greg"], "Wig", "Day trader wig.", 70.0); add_shared_item($users["greg"], "Wii", "Fun.", 300.0); add_shared_item($users["greg"], "Motorcycle", "F*****g awesome...", 3000.0); add_shared_item($users["james"], "PowerBook", "iPower.", 3000.0); add_shared_item($users["james"], "Digital Camera", "This thing is rad.", 500.0); add_shared_item($users["james"], "Break Dancing Mat", "Head spins.", 5.0); add_shared_item($users["josh"], "Basketball", "Nothing but net.", 15.0); add_shared_item($users["josh"], "Pre-amps", "Good for recording.", 700.0); add_shared_item($users["josh"], "Jetta", "My ride.", 7000.0); ?> <fb:redirect url="<?php echo $canvas_url; ?> /index.php" />