When Facebook sends updates in real time, so they have an X-Hub-Signature in the HTTP header. According to them, they are using SHA1 and App Secret as the key. Try to make a C # I confirmed the signing of ( 'has been sent by Facebook by the body of the message body request): But the signature passed there are always different sign went calculated. no one can help you solve the problem? Anyway I Hope it can help someone else. "Post-text" Aitmprop = "text">
to string authoring = req.getHeader ( "X-hub-signature"). Substrings (5); Mac ःmk = Makkgatinstans ( "Hmakshl"); Hmac.init (new Guptki Speak (FACEBOOK_SECRET.getBytes (Charset.forName ( "UTF-8")), "HmacSHA1"); string calculation authoring = Hex.encodeHexString (hmac.doFinal (body.getBytes (Charset.forName ( " Logger.debug ("calculation sigSHA1:" + sign + sign + "passed signature:" + signed pass);
Tuesday, 15 January 2013
Facebook Real-time Update: Validating X-Hub-Signature SHA1 signature in Java -
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment