phpfacebookvideo-embedding

PHP with GET Command for Facebook Video Embed Generator


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


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>';
    ?>