function fb_permission_form_html in Drupal for Facebook 6.2
File
- contrib/
fb_permission.module, line 126 - Code pertaining to Facebook's extended permissions. see http://wiki.developers.facebook.com/index.php/Extended_permissions
Code
function fb_permission_form_html($fb_app, $map) {
// Non-fbml page
// TODO: use API to hide permissions we already have
$url = url($_GET['q'], array(
'absolute' => TRUE,
));
foreach ($map as $key => $t) {
$form[$key] = array(
'#type' => 'markup',
'#value' => l(t($t, array(
'%application' => $fb_app->title,
)), "http://www.facebook.com/authorize.php", array(
'html' => TRUE,
), "api_key={$fb_app->api_key}&v=1.0&ext_perm={$key}&next={$url}&next_cancel={$url}"),
'#prefix' => '<p>',
'#suffix' => '</p>',
);
}
// TODO: add section buttons with http://wiki.developers.facebook.com/index.php/Fb:add-section-button
return $form;
}