C # XMPP X-FACEBOOK-PLATFORM SASL implementation

I am trying to integrate an application with Facebook in C #. Facebook recommends using the SASL X-FACEBOOK-PLATFORM engine. The documentation describes X-FACEBOOK-PLATFORM, which requires the following parameters:

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 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. 

From overflow.site/questions/144064 / .... I could figure out where the session_key and sig values ​​came from, but it's hard for me to find where the value is determined by call_id. Also in the above link, the answer has a sig value like:

 string sig = "api_key=" + apiKey + "call_id=" + callId + "method=" + method + "nonce=" + nonce + "session_key=" + sessionKey + "v=" + version + appSecret; 

Is there anything that separates the version and appSecret? The Facebook documentation says nothing about enabling appSecret, do I need to add?

Thanks for any help :)

+4
source share
2 answers

In the message you linked, the definition of callId (top line) was defined. As for appSecret, try it with and without. If both work, there is your answer!

+1
source
+1
source

Source: https://habr.com/ru/post/1343575/


All Articles