Youtube video / swf in static FBML


/ Published in: Other
Save to your folder(s)



Copy this code and paste it in your HTML
  1. Embed a YouTube video using FBML
  2.  
  3. Here's the code you put on your Static FBML page:
  4.  
  5. <fb:swf
  6. swfbgcolor="000000" imgstyle="border-width:3px; border-color:white;"
  7. swfsrc='http://www.youtube.com/v/xxxxxxxxxx'
  8. imgsrc='http://img.youtube.com/vi/xxxxxxxxxx/2.jpg' width='340' height='270' />
  9.  
  10. Replace "xxxxxxxxxx" with the YouTube video ID, which is the string of characters after the "v=" in the URL in your browser's address bar (up to the "&" or anything following it, if you see that after the string of letters and numbers). For example:
  11.  
  12. http://www.youtube.com/watch?v=JOt2Qp0H9G8&feature=related
  13.  
  14. You would replace "xxxxxxxxxx" with "JOt2Qp0H9G8" in both places, resulting in:
  15.  
  16. <fb:swf
  17. swfbgcolor="000000" imgstyle="border-width:3px; border-color:white;"
  18. swfsrc='http://www.youtube.com/v/JOt2Qp0H9G8'
  19. imgsrc='http://img.youtube.com/vi/JOt2Qp0H9G8/2.jpg' width='340' height='270' />
  20.  
  21. You can also change the values for "swfbgcolor" and "imgstyle" to your preferences.
  22.  
  23. The value "swfsrc" is the absolute URL to the Flash file you want to embed (YouTube videos are in Flash format).
  24.  
  25. Read more: http://www.hyperarts.com/blog/how-to-embed-youtube-videos-flash-facebook-static-fbml-pages/#ixzz1BIzHjWYd

URL: http://www.hyperarts.com/blog/how-to-embed-youtube-videos-flash-facebook-static-fbml-pages/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.