Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
339 views
in Technique[技术] by (71.8m points)

php - How to embed my own video player in Facebook?

Is it possible to embed my own video player in Facebook, so I can see the video directly in the timeline, like all the YouTube videos?

Are there any metatags I need to include in the <head> section of my site?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

To add to the other answers, a recent developer post from Facebook (which I can't seem to find at the moment) inferred that whitelisting was no longer necessary. I did it anyway. Takes about a week.

You need to use the Open Graph protocol. Info on embedding video is at the bottom of this page: http://developers.facebook.com/docs/opengraph/

This is what we found through experimentation (which will certainly change in the future):

  • The player must be a flash player.
  • It must be an https link.
  • You can add optional flashvars as parameters.

An example og:video tag from our website:

<meta property="og:video" content="https://indieflix.com/media/swf/player.swf?bufferlength=3&lightcolor=FFFFFF&autostart=true&file=http%3A%2F%2Findieflix.com%2Fstreamer%2Fhdtrailer%2F32310_320x180.mp4&provider=http&frontcolor=CCCCCC&image=http%3A%2F%2Fcdn.indieflix.com%2Ffilms%2Fimages%2Flarge%2F32310.jpg&backcolor=333333" />

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...