F
F
Froize2017-10-21 01:21:06
PHP
Froize, 2017-10-21 01:21:06

How to post a message on a wall using the Wall.Post method through an IFrame application in PHP?

I use PHP class from vladkens: https://github.com/vladkens/VK

require_once ("vendor/VK-master/src/VK/VK.php");
$vk = new VK\VK($_GET['api_id'], $_GET['secret'], $_GET['access_token']); // инициализация объекта
$re = $vk->api('wall.post', ['owner_id' => $_GET['user_id'], 'message' => 'New post on group wall via API.console.']);// постим сообщение к себе на стену

Writes Access denied: no access to call this method. (Error code 15)
I think that I need to somehow get rights from the user, I tried to do OAuth authorization, but it does not work on IFrame applications. Posting works on the Javascript SDK, but you need to do it through PHP.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Serezha, 2017-10-21
@Froize

Nothing (not at all). Only calling the confirmation window from js sdk for iframe applications.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question