• Welcome to PHPVIBE Forums. Please log in.
avatar_Marius P.

[ Video Sharing CMS v4 ] Quickfix the Facebook video rendering in source

Started by Marius P.,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Marius P.Topic starter

Since Facebook have changed their embeds, until v5 if you really need it, do this:


Open:


lib/class.providers.php


find


case 'facebook':
....


...
break;

and replace it with


case 'facebook':
$videoId = $this->getVideoId("v=", "&");
if (empty($videoId)) {
if (strpos($this->link, '/?') !== false) {
list($real,$junk) = @explode('/?', $this->link);
} else {
$real =    $this->link;
}
if(isset($real)) {
$videoId = $this->getLastNr(rtrim($real, '/'));
}
}
if ($videoId != null) {
$embedCode .= '<div class="fb-video" data-href="https://www.facebook.com/video.php?v=' . $videoId . '" " data-width="100%" data-allowfullscreen="true"></ div>';
$embedCode .= _ad('1');
} else {
$embedCode = INVALID_URL;
}
break;


Be careful and remove the space in



</ div>

I've only added it because this forum strips it out.
Seems to be working just fine with the new Fb structure & embeds like
https://www.facebook.com/videoinedit/videos/vb.1501232346774549/1752483974982717/?type=2&theater

Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Marius P.Topic starter

Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

yafe3

  •  

Similar topics (7)