FB应用程序请求指向画布页面,而不是页面选项卡 [英] FB app request points to canvas page instead of page tab

查看:120
本文介绍了FB应用程序请求指向画布页面,而不是页面选项卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在js sdk的新时间轴视图中创建了一个Facebook页面应用程序,并且我正在使用一个fb.ui调用来使用多个朋友的选择器邀请我的朋友到该应用程序。然而,当我的朋友点击邀请时,他们被带到没有类似按钮的网页版本。

I've created a facebook page app in the new timeline view with the js sdk, and I'm using a fb.ui call to use a multi-friends selector to invite my friends to the app. However, when my friends click on the invite they are taken to a version of my page which does not have a like button.

导航到正常页面(忽略最左边顶部的脸书徽标):
http:// i .imgur.com / R3S3g.jpg

Screenshot of what people see when navigating to the page normally (ignore the facebook logo on the far left top here): http://i.imgur.com/R3S3g.jpg

通过邀请链接人们看到的屏幕截图:
http://i.imgur.com/GfXfL.jpg

Screenshot of what people see when linked through an invite: http://i.imgur.com/GfXfL.jpg

我看到控制台错误:拒绝显示文档,因为X-Frame-Options禁止显示。

And I see the console error: 'Refused to display document because display forbidden by X-Frame-Options.'

有关如何解决此问题的任何提示?

Any tips on how to fix this?

感谢任何帮助。

编辑:我发现问题是邀请是将人们引导到画布应用的网址,而不是页面标签。有没有办法将人们链接到页面标签?

I've found that the issue is that the invite is directing people to the canvas url of the app, not the page tab. Is there a way to link people to the page tab?

编辑2:在键盘上研究和击中我的头后,我发现一个常见的解决方案是将画布页面重定向到页面标签(如此处here )。这对我来说是有效的,但是在接受应用程序邀请时,系统会提示用户接受应用程序权限,这不需要查看应用程序,而是在Facebook内部。我会继续更新。

Edit 2: After researching and hitting my head on the keyboard I have found a common solution is having the canvas page redirect to the page tab (as described here and here). This has worked for me, but upon accepting the app invite, the user is prompted to accept the app permissions, which aren't necessary to view the app, and I'm staying inside of facebook. I'll keep updating as I go.

编辑3:我在应用设置中启用了身份验证的引荐。我是个笨蛋

Edit 3: I had authenticated referrals turned on in the app settings. I'm a dumb. I'll put up an answer in case anybody googles this.

推荐答案

应用程序请求总是指向您的应用程序的画布页面(这就是为什么您必须在应用程序设置中为所有工作请求指定画布页面)。而不是让画布页面指向与您的页面标签相同的内容,而是创建一个页面,不需要重定向到您的页面选项卡上。

App requests always point to the canvas page for your app (which is why you must specify a canvas page in the app settings for requests to work at all). Instead of having the canvas page point to the same content as your page tab, create a page that does nothing more than redirect to your page tab url.

这在画布中的网址:

<script>
   window.top.location.href = 'YOUR PAGE TAB URL HERE';
</script>

如果用户在接受应用程序请求时看到权限请求,这可能意味着您已经启用了身份验证的引荐auth对话框部分。

If users are seeing permission requests when accepting app requests that probably means you have authenticated referrals turned on in the auth dialog section of your app settings.

这篇关于FB应用程序请求指向画布页面,而不是页面选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆