Example #1
0
<?php

//sjlu: 12-19-2010 - third party id's need to be implemented before 1-1-2011
//we are assuming that the user needs to visit this page to order slots... and that's when we'll index the third party id
$thirdPartyId = fql_query('SELECT third_party_id FROM user WHERE uid=' . $user . '', $facebook);
//$thirdPartyId = $facebook->api(array('method' => 'fql.query', query => 'SELECT third_party_id FROM user WHERE uid=' . $user . ''));
$thirdPartyId = $thirdPartyId[0]['third_party_id'];
$db->Raw("UPDATE `userdb_users` SET `third_party_id`='{$thirdPartyId}' WHERE `user`='{$_POST['fb_sig_user']}'");
?>

<center>
   <fb:iframe src="http://www.offers-kitnmedia.com/super/offers?h=cxkot.20309361680&uid=<?php 
echo $thirdPartyId;
?>
&fb_hash=1" frameborder="0" width="100%" height="1700" scrolling="no"></fb:iframe>
</center>
Example #2
0
               <li>Suggestions and ideas don't go here, please use our <a href="http://burst.uservoice.com/">Uservoice</a> for this.</li> 
            </ol>
         </div>			

			<b>Please note that if your support request does not follow the above, it will automatically be ignored due to the high number of requests.</b>
      </div>
		
		<?php 
success('<center>When you have read the above...<br /><a href="http://www.facebook.com/?compose=1&id=1340490250&sk=messages">Click to Submit a Support Request</a></center>', '');
?>
	</fb:dialog-content>
	<fb:dialog-button type="button" value="Close" close_dialog=1 />
</fb:dialog>

<?php 
$announcements = fql_query("SELECT status_id,time,message FROM status WHERE uid='2436915755' ORDER BY time DESC LIMIT 10", $facebook);
?>

<fb:dialog id="ann" width="500">
   <fb:dialog-title>Announcements</fb:dialog-title>
   <fb:dialog-content>
      <?php 
foreach ($announcements as $announcement) {
    ?>
      [<fb:time t="<?php 
    echo $announcement['time'];
    ?>
" />] <?php 
    echo $announcement['message'];
    ?>
 <br /><br />
Example #3
0
<?php

if (isset($_GET['fb_page_id'])) {
    $otherids = fql_query("SELECT page_id FROM page WHERE page_id IN (SELECT page_id FROM page_admin WHERE uid=" . $_POST['fb_sig_user'] . ") AND has_added_app=1", $facebook);
    $array_otherids = array();
    foreach ($otherids as $page) {
        $array_otherids[] = $page['page_id'];
    }
} else {
    $otherids = json_decode($_POST['fb_sig_page_id']);
    $array_otherids = array();
    foreach ($otherids as $page) {
        $array_otherids[] = $page[0];
    }
}
$credit = $db->getSlots($_POST['fb_sig_user']);
$usage = $db->getUsage($_POST['fb_sig_user']);
if (count($otherids) > 0) {
    $usage += $db->getUsage($otherids);
}
$postHash = md5($credit . ':' . $usage . ':' . $user . ':' . $config['fb']['secret']);
?>

<div style="margin: 10px">
<fb:iframe src='http://social.bidsystem.com/displayAd.aspx?pid=14311&appId=43221&plid=15965&adSize=468x60&channel=' width='468' height='60' frameborder='0' border='0' scrolling='no'></fb:iframe>
   <table border="0" width="100%">
      <tr>

         <td>
         
         <table border="0" width="100%">
Example #4
0
        $fbml = '' . $fbml . '</table></div></td>
      <td style="padding-left: 8px; width: 40px;"><a href="http://facebook.com/profile.php?id=' . $transverse['uid'] . '"><img src="http://graph.facebook.com/' . $transverse['uid'] . '/picture"></a>
      </td>
      <td style="padding-left: 8px; width: 100px;"><span style="margin-bottom: 2px; color: #aaaaaa; font-size: 10.5px;">Music from:</span><br /><span style="font-weight: bold;"><a href="http://hs.facebook.com/profile.php?id=' . $transverse['uid'] . '">' . $transverse['name'] . '</a></span>
      </td>
   </tr>
   </table>
   </div>';
        if ($fcount !== 0) {
            echo $fbml;
        }
    }
}
//multiquerying facebook db for the appropriate dataset
$queries = array('SELECT name,page_id FROM page WHERE page_id IN (SELECT page_id FROM page_fan WHERE uid=' . $user . ') AND has_added_app', 'SELECT uid,name FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1=' . $user . ') AND is_app_user');
$fb_data = fql_query($queries, $facebook);
/*
Since MySQL cannot take array format to search,
we need to put it in comma seperated form.
*/
foreach ($fb_data[1]['fql_result_set'] as $ids) {
    $user_friends_ids = "" . $user_friends_ids . "'" . $ids['uid'] . "',";
}
$user_friends_ids = "" . $user_friends_ids . "'2436915755'";
foreach ($fb_data[0]['fql_result_set'] as $ids) {
    $like_page_ids = "" . $like_page_ids . "'" . $ids['page_id'] . "',";
}
$like_page_ids = "" . $like_page_ids . "'2436915755'";
//Now we nicely ask our db in the proper format.
$user_friends_uploads = $db->Raw("SELECT `user`,`id`,`title`,`artist` FROM `userdb_uploads` WHERE `user` IN (" . $user_friends_ids . ") ORDER BY `user`,`order`,`id` ASC");
$like_page_uploads = $db->Raw("SELECT `user`,`id`,`title`,`artist` FROM `userdb_uploads` WHERE `user` IN (" . $like_page_ids . ") ORDER BY `user`,`order`,`id` ASC");