【发布时间】:2014-06-19 09:29:48
【问题描述】:
我在客户网站 (yy.com) 上放置了一个 iFrame (xx.com),该 iFrame 有一个应该重定向到客户网站 (yy.com) 的 facebook 共享。问题在于 og:image & og:title 因为我将它们放在 xx.com bcz 我无法访问 yy.com。共享未显示我在 xx.com 中放置的图像和标题。有办法吗?
xx中的代码如下:
<head>
<meta property="og:url" content="yy.com" />
<meta property="og:title" content="title" />
<meta property="og:image" content="image-path" />
</head>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/ar_AR/all.js#xfbml=1&appId=xxapp-id";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-share-button" data-href="yy.com" data-type="button_count"></div>
yy.com中的代码如下:
<iframe width="950" height="600" frameborder="0" src="http://xx.com/path-to-file"></iframe>
【问题讨论】:
-
让我们看看我是否做对了。您是在 yy.com 中构建 xx.com,还是反过来?无论如何,框架站点是通过共享按钮共享的。我会考虑分享对话
https://www.facebook.com/dialog/feed?app_id=APP_ID&link=your_link&picture=some_pic&name=title&caption=caption&description=etc&redirect_uri=url_you_want等。分享对话仍然有效。我不确定它是否会继续存在,但我喜欢它,因为通过简单的<a href></a>,你可以实现你想要的 -
是的,我在 yy.com 中构建 xx.com。我需要显示分享数量的分享按钮
-
那我的回答不会有任何帮助,对不起。