使用Windows Communication Foundation进行实时更新

时间:2011-11-10 13:06:49

标签: wcf facebook real-time updates

我尝试使用Windows Communication Foundation和REST实现实时更新;我已成功解决了一部分问题(请参阅link

所以我订阅了我想要的活动,但没有收到任何通知。这就是我在服务器中收听更新的内容:

[OperationContract]
        [WebInvoke(
            Method = "POST", 
            RequestFormat= WebMessageFormat.Json,
            ResponseFormat = WebMessageFormat.Json,
            BodyStyle = WebMessageBodyStyle.Wrapped,
            UriTemplate = "RTUHandler")]
        void RTUPostInfo(Stream stream);

我在Facebook上订阅了这个订阅:

{"data":[{"object":"user","callback_url":"http:\/\/mysite.com\/rtu\/rtuhandler.svc\/rtuhandler","fields":["books","friends","interests","movies","music"],"active":true}]}

如您所见,回调的网址是:

http://mysite.com/rtu/rtuhandler.svc/rtuhandler

在Windows Communication Foundation和REST中使用实时更新时,我是否需要考虑哪些因素? 作为旁注,我可以使用Fiddler向该URL发送POST请求,并像Facebook那样模拟Json数据;并按预期工作......但是从Facebook我什么都没得到。

提前致谢。

全型。

0 个答案:

没有答案