From my application I try to share a document (hyphal animation) on my wall using this code:

VKApiDocs docs = new VKApiDocs(); VKRequest uploadWallServerRequest = docs.uploadWallDocRequest(file); uploadWallServerRequest.executeWithListener(new VKRequestListener() { @Override public void onComplete(VKResponse response) { super.onComplete(response); } }); 

As far as I understand, after the execution of this code (onComplete (VkResponse) occurs, the request is successful) this gif-animation should appear on the wall of my profile. But it appears only in the list of my documents, it is not on the wall.

How to make a document on the wall?

    1 answer 1

    So, apparently it will not work. After executing the https://vk.com/dev/docs.save method, you need to do the method:

    https://vk.com/dev/wall.post

    Either do a bunch of methods: docs.get (get document data) + wall.post (attach a document to the post).

    • No, the docs.uploadWallDocRequest method already encapsulates requests 1) for receiving the server url for downloading 2) loading the document on the server 3) saving the document docs.save - P. Ilyin
    • Yes, it is as clear as day. I meant that in order to post a document on the wall - you need to manually write all the methods. All 4. - Vladimir
    • I do not know what the 4th method, there are only three, judging by the documentation. What is the difference between handwritten code and what is encapsulated in the method I use in the question? - P. Ilyin
    • You are not looking there. You use a complex of 3 methods from the official SDK. And I propose not to use it, but write separately 4 methods (3, which are from the SDK + wall.post). Or alternatively, if you want to upload a document to the wall. Your code loads the document into your documents (in VK). Then just run the wall.post method in the application, adding the ID of the document you downloaded to it. - Vladimir