Answer the question
In order to leave comments, you need to log in
Why is the hashtag not being attached in the wall.post method in the VK API?
Good day to all, comrades. The next question was on the agenda.
The wall.post method works when I just post, but if I try to add a hashtag, the VK API returns an error.
For example, I send a message:
https://api.vk.com/method/wall.post?owner_id={my id}message={TEST MESSAGE
#hashtag}&access_token={token}
Response:
{"error":{"error_code ":5,"error_msg":"User authorization failed: no access_token passed.","request_params":[{"key":"oauth","value":"1"},{"key":"method" ,"value":"wall.post"},{"key":"owner_id","value":"17315390"},{"key":"message",
"value":"TEST MESSAGE \r\n"}]}} Although if you just send the same message, without the hashtag, everything works. What could be the problem?
Answer the question
In order to leave comments, you need to log in
It is best to pass POST parameters with a request, but if you still want to pass GET parameters with a request, then you need to decode special characters from the message so that they do not violate the integrity of the link.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question