M
M
Millerish2016-07-03 21:02:21
Python
Millerish, 2016-07-03 21:02:21

VK API how to correctly pass the # symbol?

Good evening!
I send a request via VK api, it works, but if I include a pound sign (#) in the request, it breaks.
Without the hash symbol looks like this:

r = requests.get('https://api.vk.com/method/wall.post?owner_id=' + gid + '&access_token=' + access_token + '&message=' + message)

If I add a pound sign (#) to the message, the request is digested, I also tried to specify the pound sign through the code (#) but the situation does not change. Also tried to put in the end-beginning of the request - similarly.
The error says either code 200 or (for some reason) that I'm not authorized.
How to correctly add a hash to message?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
#
#algooptimize #bottize, 2016-07-03
@Millerish

Urlencode

I
Ilya, 2016-07-03
@FireGM

use post method

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question