A
A
achuraev2016-02-14 17:12:42
PHP
achuraev, 2016-02-14 17:12:42

VK API, PHP How to get a token that has enough rights for the wall.post method?

Good afternoon!
The essence of the task is to make a post on the wall of the current user from the site.
I have a standalone application, with its ID I redirect to authorize, I get code. By code I get access_token. Of course I request the rights of wall. When requesting wall.post, I get the 15th error Access denied: no access to call this method. When I receive the code, I substitute my base domain in the redirect_url, if I substitute the vk blank domain, then this method starts working.
The problem lies in the fact that substituting the vk domain does not make it easier for me. I can’t get a token and make a post.
Question - how to be? What is the algorithm for obtaining such a token so that I can authorize the user and make posts on his wall on his behalf?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel Gromadchuk, 2016-02-14
@Gromadchuk

For sites, access to the wall is limited. You should do authorization on the site through the Open API and then you can only make entries through the confirmation window .

Y
Yuri, 2016-02-14
@riky

I have a standalone app

standalone are desktop programs (not websites). and this mode is not accidentally made so that it is impossible to get tokens for sites.
There is only one way - to send users to follow the link with redirect_url=vk blank and copy the token from there. Yes, they will see a warning that it is impossible to copy, and many will not do this and will do it right.
to make entries on the user's wall, the token is not needed - the usual share button - the user himself shares.
if you allow all sites access to the wall, then very quickly it will be polluted by all and sundry.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question