Question

I want to implement Realtime Updates for my Facebook MVC application. I created it from template in Visual Studio. I'm following Facebook documentation and this blog post.

Template has already some boilerplate code for UserRealtimeUpdateController. How to configure endpoints to listen to subscriptions, and what should I put as my callback, when I create new Realtime Update Subscription?

Was it helpful?

Solution

Endpoints are defined in WebApiConfig class in App_Start folder.

public static void Register(HttpConfiguration config)
{
   config.Routes.MapHttpRoute(
        name: "DefaultApi",
        routeTemplate: "api/{controller}/{id}",
        defaults: new { id = RouteParameter.Optional }
   );
}

So, by default the callback URL should be something like:

http://yourservername.com/api/userrealtimeupdate
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top