V
V
Vova Putsyk2015-04-13 15:47:11
Python
Vova Putsyk, 2015-04-13 15:47:11

Vk API not working. What to do?

The code:

import vk

vkapi = vk.API('4874979', '****', '****')
vkapi.access_token=*************
vkapi.wall.post(message="Hello, world")

Throws an error:
File "meassage.py", line 4
vkapi.access_token=*********
^
SyntaxError: invalid syntax

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vova Putsyk, 2015-04-13
@vovawed

Found a solution:
import vk
vkapi = vk.API(access_token='access_token')

K
Konstantin Volkov, 2015-04-13
@kostya__wolf

Maybe there are no quotes? Or semicolons?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question