A
A
Anton Melentiev2017-02-01 18:38:38
PHP
Anton Melentiev, 2017-02-01 18:38:38

How to use wall.post from a standalone application?

There is a banal code:

$request_params = array(
    'owner_id' => $id,
    'message' => 'Парам пам пам',
    'access_token' => $access_token
    );
  $get_params = http_build_query($request_params);
  $result = json_decode(file_get_contents('https://api.vk.com/method/wall.post?'. $get_params));
  print_r($result);

I receive the user's $access_token during his authorization and temporarily store it.
Error:
15 Access denied: no access to call this method
What am I doing wrong? Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stanislav Kudelko, 2017-02-01
@flerry

Well, firstly, not every kind of token works perfectly for someone else's IP. Secondly, did you set scope=messages exactly?

S
Sergey Goryachev, 2017-08-31
@webirus

https://www.bkosborne.com/jquery-feature-carousel
_ _

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question