M
M
Mikhail Mikhail2015-09-17 14:01:45
JavaScript
Mikhail Mikhail, 2015-09-17 14:01:45

How to repost group news to your wall?

Good afternoon. tell me how to repost the news to your wall?
the documentation says that this is only for applications, but there are sites from which you can repost to your wall!
I now write {error_code: 15, error_msg: "Access denied: no access to call this method", request_params: Array[4]}
tell me how to overcome it?

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="../css/newPost.css">
    <title>Отправка изображения на сервер</title>
</head>

<body>

<script src="//vk.com/js/api/openapi.js" type="text/javascript"></script>
<script language="javascript">
    VK.init({
        apiId: //top secret key
    });
    function authInfo(response) {

        if (response.session) {
            alert('lall');
            VK.Api.call('wall.repost',
                {
                    'object': 'wall-101203840_5'
                },
                function (r) {
                    if (r.response)
                        alert(r.response);
                    if (r.error) {
                        console.log(r.error);
                        if (r.error.error_code == 10007) {
                            alert('Для участия в акции необходимо разместить запись на стене.');
                        }
                        if (r.error.error_code == 20) {
                            alert('Произошла неизвестная ошибка, пожалуйста повторите еще раз.');
                        }
                        if (r.error.error_code == 14) {
                            alert('Произошла неизвестная ошибка, повторите поже.');
                        }
                        return false;
                    }
                }
            );
        }
        else {
            alert('not auth');
        }
    }

//    VK.Auth.getLoginStatus(authInfo);
//    VK.UI.button('login_button');
</script>
<form id="repost" name="upload" method='post'>
    <input type="button" value="Отправить" onclick="VK.Auth.getLoginStatus(authInfo,1);">
</form>
</body>
</html>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
VanKrock, 2015-09-17
@VanKrock

I once wrote to support about additional rights for the site like a standalone application (adding a post to the wall and deleting a post from the wall), to which I received a response:

Rights are connected manually for high-quality services that really need them.
You cannot use the standalone application from the server.

To the question of how to show the service at the development stage, I received the answer:
That is: write a service with a confirmation window, show your service to VK support and indicate what additional rights you need, and if VK considers your service to be of high quality, then you will be given additional rights.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question