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?

有帮助吗?

解决方案

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
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top