问题
I'm trying to embed a flash audio player, I've setup the OG meta tags so they look pretty much like those of SoundCloud or YouTube.
The issues I'm having are:
- The player is never rendered when using the Feed Dialog (as in the
og:image
links to the shared page, and doesn't swap in the player as it does for YouTube and SoundCloud). - The player is rendered when just pasting the URL into the 'status' box on Facebook; however, sometimes it only renderes if 'secure browsing' is disabled.
My guess as to the second secure browsing issue, is I've just managed to break an OG tag while trying to fix the first.
<meta property="fb:app_id" content="132849513527946" />
<meta property="og:type" content="video" />
<meta property="og:url" content="http://beta.mybabytales.com/memories/6780fd71d0be818657df2cbe379ffdb5" />
<meta property="og:title" content="MyBabyTales Memory: July 28, 2012" />
<meta property="og:description" content="MyBabyTales" />
<meta property="og:image" content="http://beta.mybabytales.com/video.gif" />
<meta property="og:site_name" content="MyBabyTales" />
<meta property="og:video:secure_url" content="https://beta.mybabytales.com/player/dewplayer/dewplayer-vol.swf?showtime=true&autostart=true&mp3=http%3A%2F%2Fapi.twilio.com%2F2010-04-01%2FAccounts%2FACd883111c969a8582d86869ee98ea326f%2FRecordings%2FRE03bc1a2935e00f7ef466a1848ac9d00b.mp3" />
<meta property="og:video" content="http://beta.mybabytales.com/player/dewplayer/dewplayer-vol.swf?showtime=true&autostart=true&mp3=http%3A%2F%2Fapi.twilio.com%2F2010-04-01%2FAccounts%2FACd883111c969a8582d86869ee98ea326f%2FRecordings%2FRE03bc1a2935e00f7ef466a1848ac9d00b.mp3" />
<meta property="og:video:height" content="200" />
<meta property="og:video:width" content="460" />
<meta property="og:video:type" content="application/x-shockwave-flash" />
Things I've tried:
- Adding/Removing the secure URL
- Only using HTTPS (for the main video url)
- Adding the height/width (I believe those are optional)
- Using a custom OG type
- Using the built-in OG video type
Anyone have this issue before? Or is there something obvious I'm missing with the OG tags?
Update: Posted report here, will update if it's resolved there.
回答1:
I've run into two things that have caused similar issues.
- https/OG tag mis-configuration. (untrusted certificate, no secure_url provided, unable to parse OG tags, etc)
- crossdomain.xml not properly configured.
You can debug any issues with your OG tags by using the Facebook OG tag debugger. However, it doesn't look like there are any issues with https or your OG tags.
So, the next thing I would check is your crossdomain.xml file, which it looks like you don't have set. You can read up on the Adobe Cross-Domain Specification File, if you'd like. Essentially it sets the cross-domain policy for your Flash files. It lives in the root of your domain (http://example.com/crossdomain.xml). Here's what we have in our crossdomain.xml file:
<cross-domain-policy>
<allow-access-from domain="*"/>
<site-control permitted-cross-domain-policies="master-only"/>
</cross-domain-policy>
In addition, I'm seeing "XML Error" on this secure_url file: https://beta.mybabytales.com/player/dewplayer/dewplayer-vol.swf?showtime=true&autostart=true&mp3=http://api.twilio.com/2010-04-01/Accounts/ACd883111c969a8582d86869ee98ea326f/Recordings/RE03bc1a2935e00f7ef466a1848ac9d00b.mp3
回答2:
i have found the most success using the facebook sharer.php script
https://www.facebook.com/sharer/sharer.php?u=http://google.com
the only 'gotcha' i have run into is that if you continuously change the og: tags on your page, you need to use the object debugger on that url to 'reset' facebook's cache of your page
来源:https://stackoverflow.com/questions/12256320/embed-video-not-displayed