Page 1 of 1

Response as html

Posted: Sun Jan 25, 2015 2:43 am
by zimennik

Hello.
I'm trying to add VK API to my app. But I'm stuck on authorization.
I create service to get login page (html) wich after autorization must return token (i think). I also create html-component to show this page. But I don't know how to use response as html.
Or maybe there is a better way to authorization (without html-component)?


Response as html

Posted: Sun Jan 25, 2015 5:08 am
by M&M

I dun really know how / what the VK API thingy is but if it works in any way that's similar to the REST API calls, then you should technically be able to call that using the correct parameters / request headers, and it should return a authorization token, which you can use in your subsequent calls

M&M


Response as html

Posted: Sun Jan 25, 2015 11:13 am
by zimennik

As I know VK API work this way: it send you html login page - you enter value and send back - it send you token. But I could be wrong.


Response as html

Posted: Sun Jan 25, 2015 11:44 am
by Illya Stepanov

Hi zimennik -

Unfortunately we are not familiar with VK API you should check their documentation and make your own implementation in your app. If they have a REST service, it will be much easier, in other cases you need to make your own implementation.


Response as html

Posted: Sun Jan 25, 2015 12:48 pm
by zimennik

Ok, thanks.
Can you tell me how can I load response of service as html page?


Response as html

Posted: Sun Jan 25, 2015 1:48 pm
by Illya Stepanov

Can you please show what service is returning as a response?


Response as html

Posted: Sun Jan 25, 2015 2:17 pm
by M&M

Is this what you are referring to?

http://vk.com/pages?oid=-17680044&p=A...


Response as html

Posted: Sun Jan 25, 2015 3:01 pm
by Illya Stepanov

Thanks M&M!

As far as I can see this API uses OAuth 2.0 protocol, so it's better to start from this tutorial - http://devcenter.appery.io/tutorials/...

-- and after that connect VK API.


Response as html

Posted: Sun Jan 25, 2015 4:07 pm
by zimennik

Thank you, guys! Very helpful!