3
I’m sending notifications to registered users via Facebook about new events. How do I redirect the user to the event URL, sent via the Facebook API?
private function sendNotification($userFbId, $message, $url){
    $attachment = array(
      'access_token' => Configure::read('fb_id').'|'.Configure::read('fb_secret'),
      'href' => $url, 
      'template' => $message,
    );
    try {
        $api = $this->Facebook->api('/'.$userFbId.'/notifications/', 'POST',  $attachment);
    } catch (Exception $e) {
        $api = $e->getMessage();
    }
    return $api;
}

Do you want facebook to redirect the user, after being invited by the notification, to the event on facebook? Check this out: https://developers.facebook.com/policy/
– Lollipop
Under the
$api = (...), if you putheader("Location: {$url}");works?– Felipe Douradinho
@Lollipop I register an event on the site and send a notification to registered users on it, through Facebook. When sending a notification on Facebook, I want you to redirect the user to the url I report.
– Marcelo de Andrade
I think just use friend header by passing the url with the parameters.
– Rogers Corrêa