I
I
ibr_982017-09-15 13:38:48
Python
ibr_98, 2017-09-15 13:38:48

Why am I not getting json object?

Hello!
After loading the image, jsonthe -object with the fields server, photo, , should come out hash, but only this came out:
2e43df2ba86a49c4ad49d46db73d98db.png
what could be the matter?
here is the code:

myFile = vk.photos.getWallUploadServer(group_id=10040025, upload_url = {'photo': open(r'P70912-223105.jpg', 'rb')})
print(myFile)

Thank you

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Kuzmichev, 2017-09-15
@Assargin

How to learn to work with the VK API:
https://vk.com/dev/photos.getWallUploadServer :

Returns the server address for uploading a photo to a user's or community's wall.
After a successful upload, you can save the photo using the photos.saveWallPhoto method .
Parameters :
group_idID of the community on whose wall you want to upload a photo (without the minus sign).
integer
Result :
Upon successful execution returns an object with fields upload_url, album_id, user_id.

U
userfordownload, 2017-09-15
@userfordownload

1. We get the address where we will upload the photo (GET request)
2. We save the photo (POST request)
What kind of library is this (import at the beginning of the python file, what is written)? Give me a link to github.com.
myFile = vk.photos.getWallUploadServer
Or self-written?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question