我正在尝试在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分开的任何内容? Facebook文档没有说明包含appSecret,是否有必要添加?
感谢您的帮助:)
答案 0 :(得分:1)
在您链接的帖子中,有一个callId的定义(顶行)至于appSecret,请尝试使用和不使用。如果两者都有效,那就有你的答案!
答案 1 :(得分:1)