Answer the question
In order to leave comments, you need to log in
How to transfer product photos from a site to a group using the VK API?
We have a website where everyone has their own personal account with a list of goods, the task is such that the user can specify a link to his group and in this group a photo album with goods from the personal account is created.
Is it possible to do this from a regular site and not from a mobile application? Do you have any recommendations or who has already solved this problem?
Taxi, I'll try to describe everything in more detail ...
There is a user, he logs in to our site through the social. VKontakte network, we ask for access to his personal information via the VK API.
He enters his personal account in the products section and there in the field enters a link to his group into which he needs to upload photos of goods from his personal account (by creating an empty photo album and adding photos to it). Now we are stuck on the fact that the token is not returned to us. (no response from https://oauth.vk.com/access_token, more precisely, an empty response to the token vk request comes)
Which way to dig, what could be the matter?
Answer the question
In order to leave comments, you need to log in
Perhaps, why not? You need to authorize the user using VK. The user must allow access to their groups, photos and wall (well, or similar). If the user is the admin of the group (or he has the rights to post there), then he can easily send an Ajax request to your server script by pressing the button and then the mystic VK API (everything is described here vk.com/dev/upload_files )
The process of uploading photos in PHP can be googled. I myself did a lot of various rakes on Node.js. The fact is that sometimes it is difficult to understand where the problem is: in my code or in passing VK parameters? And it happens that the API itself dies and everything hangs.
Also, do not forget that pop-up windows should be allowed, since you can post a photo only with confirmation in the pop-up. Do not be afraid if there is an inscription undefined instead of a photo - it was some kind of bug. I looked at it for a long time until I started updating the group itself in the browser, it turns out everything was already working.
PS use VK Open API
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question