0
我以前问过在用户页面上制作一个类似自定义消息,并被指示使用开放图。我已经试过教程,似乎无法让它与我的按钮一起工作,任何人都可以帮助或提供一些建议?Facebook Like按钮并打开图
我已经使用了调试工具,并没有得到任何错误,并且对我接下来应该做什么感到有点困惑。我的应用程序使用固定的php标题,并使用AJAX动态更改主体内容。我想要做的是让用户'喜欢'一个优惠券,并显示在他们的网站上与我的自定义消息,如“有人使用优惠券A从www.somesite.com”
以下是在我脑海中;
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head prefix="og: http://ogp.me/ns# <?php echo APP_NAME;?> fb: http://ogp.me/ns/fb/<?php echo APP_NAME;?># test: http://ogp.me/ns/fb/test#">
<meta property="fb:app_id" content="xxxxxxxxxxxxxxx" />
<meta property="og:type" content="<?php echo APP_NAME;?>:coupon" />
<meta property="og:url" content="http://somesite.com/" />
<meta property="og:title" content="Sample Coupon" />
<meta property="og:description" content="Some Arbitrary String" />
<meta property="og:image" content="http://ogp.me/logo.png" />
这里是我喜欢的脚本,目前工作,但对于页面而不是优惠券。
<!-- Code for FB like button -->
<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/en_GB/all.js#xfbml=1&appId=xxxxxxxxxxxxxxx";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div class="fb-like" data-href="http://apps.facebook.com/test/" data-send="false" data-width="450" data-show-faces="false"></div>
感谢您的答复@Inga H,这是我按照教程。当我创建按钮来点击时,它不起作用。 – JPK 2012-02-22 14:10:16
你的行为已获批准吗?还是你还在测试用户?你有可能提供一个链接到网站或app_id的机会吗? – 2012-02-22 14:17:11
应用ID是175193285914239,该操作已获批准 – JPK 2012-02-22 14:23:33