页面选项卡上的 fbml
我正在为客户构建一个应用程序。我希望将 iframe 放在客户端的页面选项卡上,但目前看来很难做到。相反,我很高兴有一个画布应用程序的链接,我可以在其中做我想做的事情。问题是我有一个我不喜欢的额外步骤。
用户从此处开始(将在客户端页面上)这只是此页面的静态图像链接--> http://apps.facebook.com/test-site/
他们看到相同的加入按钮,单击该按钮时会提示用户授予权限。
我讨厌有这个额外的步骤。
有谁知道如何在该页面选项卡上请求此应用程序的权限?
我尝试在此页面上使用fbjs,但您可以看到当您请求权限时,它代表选项卡应用程序请求权限。我不知道如何为此设置appid......
<div style="float:left;
background:url(http://webhooks.digitas.com/Static/images/FB_activate_state1.jpg)
no-repeat; width:520px; height:419px">
<div style="float:left; width:520px; padding-top:205px">
<form name="form" id="form" method="POST" onsubmit="showPermissions(); return false;">
<div style="width:520px;float:left; padding-top:2px">
</div>
<div style="float:left; padding-left:70px; padding-top:10px">
<input type="image" src="http://webhooks.digitas.com/Static/images/join_off.jpg"
value="Submit" /></div>
</form>
</div>
</div>
<script>
<!--
function showPermissions(){
Facebook.showPermissionDialog("offline_access", "ondone");
}
function ondone(){
new Dialog().showMessage("Message", "Ajax Error", "Ok");
}
//-->
</script>
I'm building an app for a client. I'd love to have the iframe on the client's page tab, but that seems very hard to do at this point. Instead, I'm happy to have a link to a canvas app where I can do what I want. The problem is that I have an extra step that I don't like.
Users start here (will be on client page) It's just a static image link to this page--> http://apps.facebook.com/test-site/
Where they see the same Join button, that, when clicked, prompts the user for permissions.
I hate having this extra step.
Does anyone know of a way to request permissions for this app on that page tab?
I tried using fbjs on this page, but you can see that when you request the permissions, it's requesting permissions on behalf of the tab app. I can't figure out how to set the appid for this....
<div style="float:left;
background:url(http://webhooks.digitas.com/Static/images/FB_activate_state1.jpg)
no-repeat; width:520px; height:419px">
<div style="float:left; width:520px; padding-top:205px">
<form name="form" id="form" method="POST" onsubmit="showPermissions(); return false;">
<div style="width:520px;float:left; padding-top:2px">
</div>
<div style="float:left; padding-left:70px; padding-top:10px">
<input type="image" src="http://webhooks.digitas.com/Static/images/join_off.jpg"
value="Submit" /></div>
</form>
</div>
</div>
<script>
<!--
function showPermissions(){
Facebook.showPermissionDialog("offline_access", "ondone");
}
function ondone(){
new Dialog().showMessage("Message", "Ajax Error", "Ok");
}
//-->
</script>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您完全准备好拥有对话权限了吗?
如果没有,在选项卡页上,您可以将其链接到具有完整页面权限授予的画布应用程序。
are you completely set on having the dialog permissions?
if not, on the tab page, you can have it link to the canvas app with a full page permissions grant.