Facebook Open Graph 音乐混乱
我一生中正好度过了 8 个小时。 4个小时我试图找出问题所在并进行调试。
问题
我正在尝试将元标记添加到我的网页上,其中有一首歌曲。我希望分享链接的人也能在 Facebook 上播放该曲目。
所以我发现这个我读了非常好的文档。
然后我尝试实现它,这是我的代码。
<html class="local_en_US" xmlns:music="http://ogp.me/ns/music#" xmlns:og="http://ogp.me/ns#">
<meta property="og:type" content="music.song" />
<meta property="music:musician" content="http://testappwebsite.dyndns-office.com/artist/sarya-al-sawas/" />
<meta property="music:duration" content="619" />
<meta property="og:image" content="http://testappwebsite.dyndns-office.com/m/pics/artists/l.4eeea466d2fe79.75675583.jpg" />
<meta property="og:url" content="http://testappwebsite.dyndns-office.com/track/sarya-al-sawas-mnalbortom-al-ta7tani/" />
<meta property="og:site_name" content="BeatBase" />
<meta property="fb:app_id" content="135615343218651" />
<meta property="og:audio" content="http://testappwebsite.dyndns-office.com/m/tracks/t.4eef1d812c56f8.45560770.mp3" />
<meta property="og:audio:type" content="audio/vnd.facebook.bridge" />
然后我尝试分享我的状态的网址进行测试,但我没有得到任何播放按钮。 我去调试了。
顺便说一句,过去 4 个小时用于在网上搜索线索。
我找到了一些。
i just spent EXACTLY 8 hours of my life.
4 hours i tried to figure out what the problem is and debug.
The Problem
i'm trying to add meta tags to my webpage wich has a song on it. i want people who share the link to play the track on facebook as well.
so i found this i read it very good documentation.
then i tried implementing it, here is my code.
<html class="local_en_US" xmlns:music="http://ogp.me/ns/music#" xmlns:og="http://ogp.me/ns#">
<meta property="og:type" content="music.song" />
<meta property="music:musician" content="http://testappwebsite.dyndns-office.com/artist/sarya-al-sawas/" />
<meta property="music:duration" content="619" />
<meta property="og:image" content="http://testappwebsite.dyndns-office.com/m/pics/artists/l.4eeea466d2fe79.75675583.jpg" />
<meta property="og:url" content="http://testappwebsite.dyndns-office.com/track/sarya-al-sawas-mnalbortom-al-ta7tani/" />
<meta property="og:site_name" content="BeatBase" />
<meta property="fb:app_id" content="135615343218651" />
<meta property="og:audio" content="http://testappwebsite.dyndns-office.com/m/tracks/t.4eef1d812c56f8.45560770.mp3" />
<meta property="og:audio:type" content="audio/vnd.facebook.bridge" />
Then i tried sharing the url on my status to test, and i didnt get any play button.
i went to debug.
by the way the last 4 hours went for searching the web for clues.
i found some.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它位于您在 https://developers.facebook.com/ 上阅读的文档的第一行文档/opengraph/音乐/
基本上就是 Spotify、Rdio、MOG 等。被允许使用这些参数是因为 Facebook 特别允许他们这样做。
It's in the first line of the documentation you were reading at https://developers.facebook.com/docs/opengraph/music/
So basically Spotify, Rdio, MOG, et al. are allowed to use these parameters because Facebook specifically allowed them to do so.