Facebook video embeds are not showing in posts

Posted in: Newsmag
Post count: 2

When you set a post’s type to “video” and use a Facebook video URL, the embedded video does not appear in the post.

An API request is made to Facebook to get the embed code using a client access token that is hardcoded in td_video_support.php, but the access token is not working, and therefore the embed does not appear. Facebook returns “API access deactivated. To reactivate, go to the My Apps page to unarchive it.”

In previous versions of this theme, embeds were placed using a generic embed code that always worked, and there was no need for the theme to reach the Facebook servers.

Post count: 35449

Hi,
Normally the post video format should be working with those type of links
https://www.facebook.com/{page-name}/videos/{video-id}/
https://www.facebook.com/{username}/videos/{video-id}/ – user’s video must be public
https://www.facebook.com/video.php?v={video-id}
and those should be on your account that is connected to the theme panel – https://i.imgur.com/e92CMnv.png
Thank you!

Post count: 2

This doesn’t work because, as I was saying, the access token is hardcoded in the td_video_support.php file.

Please check lines 157-195 of wp-content/plugins/td-composer/legacy/common/wp_booster/td_video_support.php (version Newsmag 5.4.3.1) to understand how the video embed code is being generated. Access token is hardcoded in line 14.

When a post is loaded, the theme performs an HTTP request that looks like this:

https://graph.facebook.com/oembed_video?url=https://www.facebook.com/video.php?v=621486963428730&access_token=281071126312386|83f03eb7e4a2707cd68aada9b3f98c79

The access_token parameter is taken from td_video_support.php line 14. The result is “API access deactivated. To reactivate, go to the My Apps page to unarchive it.” so the video is not displayed.

That access token was presumably created by a Newsmag developer and was later deactivated or removed. The access token must be reenabled by the developer, or a new access token should be created and pushed as an update, or an option for the theme user to provide his own access token should be added (like with YouTube, where you can provide your own API access token).

Post count: 35449

I’ve reviewed the token, and it seems that after Meta’s recent updates, the token we were using to set featured videos via Facebook is no longer valid. I’ve informed our development team, and they will assess the next steps to resolve this issue.

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newsmag’ is closed to new topics and replies.