Question

I want to create a php file with $_get command for facebook video embed generator. Please help me with it. The code which is not working is written down:

<?php
echo "<object width="400" height="224" >
      <param name="allowfullscreen" value="true" />
      <param name="allowscriptaccess" value="always" />
      <param name="movie" value="' . $video_url . '" />
      <embed src="http://www.facebook.com/v/'.$_GET["id"].'" type="application/x-    shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="400" height="224">
      </embed>
      </object>";
?>

Example: If the facebook video id is: 10150257497405484 The url should be: http://www.domain.com/embed.php?id=10150257497405484

Was it helpful?

Solution

You've got mis-matched quotes

Try this:

<?php
echo '<object width="400" height="224" >
      <param name="allowfullscreen" value="true" />
      <param name="allowscriptaccess" value="always" />
      <param name="movie" value="' . $video_url . '" />
      <embed src="http://www.facebook.com/v/' . $_GET["id"] . '" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="400" height="224">
      </embed>
      </object>';
?>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top