T
T
tempick2017-09-17 10:23:38
JavaScript
tempick, 2017-09-17 10:23:38

How to post on wall in iframe vk from phone?

There is a community iframe application in VK that has the function of posting to the community wall. Everything works fine from the computer, but if you go from the VK android application, then you need to do it differently. Here is what I found in the documentation:

Calling Methods Directly
1. Call the method, get response like
{"error":{"error_code":17,"error_msg":"Validation required: please open redirect_uri in browser",...,"redirect_uri":"... "}}
2. Open the browser with the page received in the redirect_uri.
3. If the user confirms the action, the success=1 parameter will be returned, in case of cancellation - cancel=1
4. After the user confirms the action, the required method must be called again and it will be executed.

In the second step, I direct the user using location.href to the specified address. What's next? Where do the success and cancel parameters return?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Sokolov, 2017-09-17
@sergiks

Disclaimer , I haven't yet come across posting to a wall from a mobile client, so I don't know a solution that works for sure.
Have you tried the JavaScript SDK? In the documentation about the confirmation window , where your quote comes from, this option seems to be preferable. See Calling VK API Methods in the JS SDK.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question