Answer the question
In order to leave comments, you need to log in
How to upload a photo to the wall through VK api?
here is my script:
curl "https://api.vk.com/method/photos.getWallUploadServer.xml?group_id=xxxxxxx&v=5.37&access_token=xxxxxxxx" -o dwlsrc.txt
dwlsrc=`xmlstarlet sel -t -m '//upload_url[1]' -v . -n <dwlsrc.txt`
echo $dwlsrc
curl -F "[email protected]/home/user/folder/photo.jpg" $dwlsrc
Answer the question
In order to leave comments, you need to log in
The process of uploading photos is written in the documentation .
However, the documentation is not so transparent. There, in some places you need to think specifically in order to understand what actually needs to be done. Here is an example of my implementation of uploading a photo and posting to a wall.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question