Media players on users feeds
When publishing to the users Feed how are applications like YouTube and Soundcloud able to have a media player load within their feed post on t开发者_运维百科he users wall?
You just specify the type in the head of your page by adding meta tags with the correct og types and data.
If you want to attach a video to your Open Graph page you can simply specify a video url:
og:video - e.g., "http://example.com/awesome.swf"
In a similar fashion to og:video you can add an audio file to your markup:
og:audio - e.g., "http://example.com/amazing.mp3"
See the following url for more details (under Attaching Audio and Video Data): https://developers.facebook.com/docs/opengraph/
Then when people link to your page or like your content, it will appear just like youtube/soundcloud with the player in the news stream.
精彩评论