【发布时间】:2011-07-14 17:53:36
【问题描述】:
我正在尝试在 C# 中将应用程序与 Facebook Chat 集成。 Facebook 建议使用 X-FACEBOOK-PLATFORM SASL 机制。该文档描述了需要以下参数的 X-FACEBOOK-PLATFORM:
string method // Should be the same as the method specified by the server.
string api_key // The application key associated with the calling application.
string session_key // The session key of the logged in user.
float call_id // The request's sequence number.
string sig // An MD5 hash of the current request and your secret key.
string v // This must be set to 1.0 to use this version of the API.
string format // Optional - Ignored.
string cnonce // Optional - Client-selected nonce. Ignored.
string nonce // Should be the same as the nonce specified by the server.
从this other Stackoverflow Question 我能够理解 session_key 和 sig 的值来自哪里,但是我很难找到 call_id 的值是在哪里定义的。同样在上述链接中,答案的sig 值为:
string sig = "api_key=" + apiKey
+ "call_id=" + callId
+ "method=" + method
+ "nonce=" + nonce
+ "session_key=" + sessionKey
+ "v=" + version
+ appSecret;
是否有任何东西将版本和 appSecret 分开?脸书文档没说包含appSecret,有必要加吗?
感谢您的帮助:)
【问题讨论】: