1

我正在尝试制作一个类似 youtube 的分享按钮,您可以在其中选择是否要将内容分享到您拥有的页面中。

这是我打开共享窗口的 js 代码:

function share(url){
    myWindow = window.open('http://www.facebook.com/sharer.php?u='+url, '',     
    'width=700,height=350');
    myWindow.focus();
}

然后我将 OG 元数据添加到共享内容中:

<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta property="og:url" content="https://my-url.com/content">
<meta property="og:title" content="content title">
<meta property="og:description" content="description title">
<meta property="og:type" content="video.other">
<meta property="og:image" content="http://my_url.com/image.jpg">
<meta property="og:video" content="http://my-url.com/content">
<meta property="og:video:secure_url" content="http://my-url.com/content">
<meta property="og:video:type" content="application/x-shockwave-flash">
<meta property="og:video:width" content="400">
<meta property="og:video:height" content="300">
<meta property="og:site_name" content="site name">
<meta property="fb:app_id" content="APPID">
<meta property="fb:admins" content="admin_id">

它可以正常工作,但是当我通过这种方式分享某些内容并尝试通过我的墙或朋友墙的 Facebook iPhone APP 打开它时,它不起作用。

提前致谢。

4

0 回答 0