We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I upload image files to the community wall and to my wall correctly? Please help me! I've tried different methods, I can't figure it out!
vk_api: 11.9.9
vk_session = vk_api.VkApi(token=config.vk_token) vk = vk_session.get_api() upload = VkUpload(vk_session) attachments = [] if photos: for idx, image in enumerate(photos): image.seek(0) photo = upload.photo_wall(photos=image, user_id = 4395736, group_id=group_id) print(photo) attachments.append(f"https://vk.com/photo-{photo[0]['owner_id']}_{photo[0]['id']}") post_params = { 'owner_id': f"-{group_id}", 'message': text, 'attachments': ','.join(attachments) if attachments else None } response = vk.wall.post(**post_params)
The text was updated successfully, but these errors were encountered:
Как правильно загрузить файлы изображений на стену сообщества и на свою стену? ПРошу помощи! Перепробовал разные методы, не получается разобраться!
Sorry, something went wrong.
No branches or pull requests
How do I upload image files to the community wall and to my wall correctly? Please help me! I've tried different methods, I can't figure it out!
Окружение
vk_api: 11.9.9
Пример
The text was updated successfully, but these errors were encountered: