0

I have a facebook link linke below:

https://www.facebook.com/[user]/videos/vb.xxxxxxxx3/[videoID]/?type=2&theater

How can I extract the VideoId from the link ?

slavoo
  • 5,798
  • 64
  • 37
  • 39
user2148134
  • 89
  • 1
  • 9

1 Answers1

0

You will get the video ID with the below code.

$url = "https://www.facebook.com/[user]/videos/vb.xxxxxxxx3/[videoID]/?type=2&theater";

$vid = end(explode('/',explode('/?',$url)[0]));
AeJey
  • 1,447
  • 20
  • 40
  • You have accepted this answer and then removed it. What has happened? I am sure that this will work. Please let me know if it's n't working for you. – AeJey Sep 07 '15 at 06:21