How to redirect through a notification?

3

I'm sending notifications to registered users through Facebook about new events. How do I redirect the user to the event URL sent through 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;
}

    
asked by anonymous 03.07.2015 / 22:16

1 answer

3

The notifications link can only lead to a relative link from the app's own canvas.

The relative path / GET params of the target (for example, 'index.html? gift_id = 123', or '? gift_id = 123') ... " link

And because the canvas is an iframe, it can not even redirect = /

    
08.07.2015 / 23:08