E
E
Evgeny Frolov2020-08-13 13:25:40
PHP
Evgeny Frolov, 2020-08-13 13:25:40

How to find out that the video is not allowed to be embedded on the site (VK API)?

Good afternoon! It was necessary to implement the possibility of embedding a video from VKontakte into the material on the site. I figured out how to get and parse the link, but noticed an interesting feature. Some videos work fine inside the contact and you can get the embed code, but when I run the video on the site, I see something like this:
L5wHSmV.png
Which parameter in the API is responsible for detecting such errors? I actually googled and looked in the docs before asking this question, but found nothing. Maybe I didn't search well.
It is also interesting that the video from the example does not contain materials of a sexual nature, however ...)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
nokimaro, 2020-08-13
@nokimaro

There is no such flag in api.
The only option that I know of is to check the embed link yourself and see if there is a message about the embedding ban.

R
Rsa97, 2015-04-04
@entermix

SELECT `d1`.`dialog_id`
    FROM `dialog_users` AS `d1`
    JOIN `dialog_users` AS `d2` ON `d2`.`dialog_id` =`d1`.`dialog_id`
    JOIN (SELECT `dialog_id`, COUNT(*) AS `count`
              FROM `dialog_users` 
              GROUP BY `dialog_id`) 
        AS `c` ON `c`.`dialog_id` = `d1`.`dialog_id`
    WHERE `d1`.`user_id` = :user1 
        AND `d2`.`user_id` = :user2 
        AND `c`.`count` = 2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question