• 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)

Important Announcement: PHPVibe Video Sharing CMS End of Life

Started by Marius P.


Replies: 1
Views: 45685

Linking Facebook page

Started by yafe3


Replies: 2
Views: 2279

How to change facebook thumbnail size ?!?

Started by jejeroy


Replies: 3
Views: 2601

How to Stop Sharing on other website

Started by HPR


Replies: 2
Views: 2863

Write a web source/new embed for PHPVibe

Started by Marius P.


Replies: 0
Views: 7471

The problem of video viewing PHPVibe 5.0

Started by Nayn


Replies: 25
Views: 74015

embed video does not work on v5

Started by neospider69


Replies: 6
Views: 55819