function fb_friend_request_submit_page in Drupal for Facebook 7.3
Same name and namespace in other branches
- 6.3 contrib/fb_friend.module \fb_friend_request_submit_page()
1 string reference to 'fb_friend_request_submit_page'
- fb_friend_menu in contrib/
fb_friend.module
File
- contrib/
fb_friend.module, line 48 - This module implements several features specific to Facebook friend networks.
Code
function fb_friend_request_submit_page() {
// Parse args
$params = array();
$i = FB_FRIEND_PATH_REQUEST_SUBMIT_ARGS;
while (($key = arg($i)) && ($value = arg($i + 1))) {
$params[$key] = $value;
$i += 2;
}
if (isset($_POST['ids']) && count($_POST['ids'])) {
$params['ids'] = $_POST['ids'];
// Notify third parties
$redirect = fb_invoke(FB_FRIEND_OP_REQUEST_SUBMIT, $params, NULL, 'fb_friend');
}
else {
// User pressed skip instead of inviting.
$redirect = fb_invoke(FB_FRIEND_OP_REQUEST_SKIP, $params, NULL, 'fb_friend');
}
if ($redirect) {
if (FALSE && function_exists('fb_canvas_goto')) {
fb_canvas_goto($redirect);
}
else {
drupal_goto($redirect);
}
}
return "fb_friend_request_submit_page";
}