Answer the question
In order to leave comments, you need to log in
How to correctly compose a query string to post to a user's page from a mobile application (AIR)?
Hello. I am developing a mobile application on AIR (will work on iOS and Android), which should be able to publish to the user's page.
For this I use a widget: apiok.ru/wiki/pages/viewpage.action?pageId=83034148. As far as I understand, this is currently the only possible way to perform such a task.
I received an approval beforehand by sending an email to [email protected] And I received a response that the application was approved.
But when sending a simple test request for publication, I get errors.
I also checked with the usage example: https://github.com/apiok/js_sample_widgets
Next, I give the code for generating the URL string, with server responses.
private const APP_ID:String = '1136958208';
var attachmentJSON:String = '{"media":[{"type":"text","text":"test"}]}';
var returnUrl:String = ' mersibo.ru ';
//var secretKey:String = 'D6148C766486E8C1B42E5365';
var secretKey:String = sessionSecretKey;
var signature:String = "st.attachment=" + attachmentJSON + 'st.return=' + returnUrl + secretKey;
var strUlr:String = ' connect.ok.ru/dk?st.cmd=WidgetMediatopicPost '
+ '&st.app=' + APP_ID
+ '&st.attachment=' + encodeURIComponent(attachmentJSON)
+ '&st.signature=' + MD5 .hash(signature)
+ '&
how to correctly compose this line, the signature and where there may be an error.
OAuth client authorization occurs according to the instructions:
apiok.ru/wiki/pages/viewpage.action?pageId=81822117
( www.odnoklassniki.ru/oauth/authorize?client_id=113...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question