Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9120505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:38:33+00:00 2026-06-17T05:38:33+00:00

My mobile web site allows users to send an AppRequest to their Facebook friends.

  • 0

My mobile web site allows users to send an AppRequest to their Facebook friends. This is working.

When the friend accepts the AppRequest, Facebook sends the friend to my web site. This too is working.

My web site is an ASP.Net MVC 4 application. I am trying to get my routes to recognize the incoming AppRequest acceptance but I can’t figure out how to do it.

Facebook is sending the friends to my site using this URL:

http://www.example.com/?ref=notif&code=abcdefg&fb_source=notification

This keeps getting routed to Home/Index despite my attempts to map the route to a custom controller and action. Here is what I have done so far that has failed to work:

Registered Routes:

routes.MapRoute(
   name: "FacebookAppRequest",
   url: "{ref}/{code}/{fb_source}",   //This should match the URL above
   defaults: new { controller = "Facebook", action ="FBAppRequestHandler"}
);
routes.MapRoute(
   name: "Default",
   url: "{controller}/{action}/{id}",
   defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);

Controller:

public class FacebookController : Controller
{
   public FacebookController() {}

   public ActionResult FBAppRequestHandler(
      [Bind(Prefix = "ref")] string fbReferal,
      [Bind(Prefix = "code")] string fbCode,
      [Bind(Prefix = "fb_source")] string fbSource)
   {
      //Do some stuff with fbReferal, fbCode and fbSource

      return View();
   }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T05:38:34+00:00Added an answer on June 17, 2026 at 5:38 am

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a Mobile friendly web site and every time a button gets
I need to ask users of my jquery mobile web site to select a
I have a mobile web app/site and I would like the users to upload
We have a mobile web site that requires users to enter a specific time
How to design a Web Site that will fit to Mobile and Desktop both,
I see on SocketIO's web site that it's possible to use SocketIO for mobile
I'm developing a mobile site using IUI . It's a framework that makes web
I would like to allow only mobile devices on my web site, such as
I am using jQuery Mobile and PhoneGap to create an app that allows users
Hi am new to developing Mobile Web site in .net . how can i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.