예제 #1
0
function api_canvas_parameters_other($app_id, $user)
{
    // Add the list of friends and the friends who've added the app
    // to the POST we make
    $app_info = application_get_info($app_id);
    $api_friends = user_get_all_friends($user);
    foreach ($api_friends as $k => $friend) {
        if (!platform_can_see_app($app_id, $friend, $app_info)) {
            unset($api_friends[$k]);
        }
    }
    $csv_api_friends = implode(',', $api_friends);
    return array('friends' => $csv_api_friends);
}
예제 #2
0
}
$canvas_url = redirect_str($rel_canvas_url, 'www', $ssl = 0, $force_prod = false, $force_protocol = true);
print "Facebook Open Platform: Output of Canvas url: {$canvas_url}<hr>";
// no app_id found so assume bad link
if (!$app_id) {
    print 'No app corresponding to app name or api key parameters';
    error_log('No app corresponding to app name or api key parameters');
    exit;
}
$app_info = application_get_info($app_id);
if (!$app_info) {
    print 'No app corresponding to app name or api key parameters';
    error_log('No app corresponding to app name or api key parameters');
    exit;
}
if (!platform_can_see_app($app_id, $user)) {
    print "User {$user} cannot see app id {$app_id}.  FBOPEN:NOTE - this message should be invisible to the user.";
    error_log("User {$user} cannot see app id {$app_id}.  FBOPEN:NOTE - this message should be invisible to the user.");
    exit;
}
$app_icon_url = application_get_icon_url($app_id);
$url = $app_info['callback_url'] . $url_suffix;
$fbml_env = array('user' => $user, 'app_id' => $app_id, 'canvas_url' => $canvas_url, 'source_url' => $url);
switch ($get_fb_force_mode) {
    case 'fbml':
        $use_iframe = false;
        break;
    case 'iframe':
        $use_iframe = true;
        break;
    default: