The ref
the code
and the fb_source
are passed as query string parameters. They are not part of the route. So you cannot possibly expect that {ref}/{code}/{fb_source}
would match your custom route. That would have been the case if the request looked like that:
http://www.example.com/notif/abcdefg/notification
Since the actual route looks like this (forget about query string parameters - they are not used for routing):
http://www.example.com/
all that you have here basically is the following url /
. So the best you could hope here is to modify your default route so that it routes to the desired controller:
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Facebook", action = "FBAppRequestHandler", id = UrlParameter.Optional }
);
Now get rid of the first route - it's not necessary.