当Facebook发送实时更新时,它们会在HTTPheader中包含一个X-Hub-Signature。根据theirdocumentation,他们使用SHA1和应用程序secret作为key。基于similarquestion对于C#,我尝试像这样验证签名('body'是facebook在请求正文中发送的消息):StringpassedSignature=req.getHeader("X-Hub-Signature").substring(5);Machmac=Mac.getInstance("HmacSHA1");hmac.init(newSecretKeySpec(FACEBO