邀请朋友使用网站应用程序 (FB.ui apprequests)
我在为我的网站应用程序发出应用请求时遇到问题。我可以使用 FB.ui“apprequests”方法发送邀请,但此请求不会显示在 Facebook 上。看起来它被阻止了,因为它触发了通知图标,但在第二个通知中消失了。
我找到了解决方法。我也将应用程序设置为画布,并从画布重定向到网站页面。但不知道以后会不会被封或者什么的。
从网站应用程序发送应用程序请求的推荐方法是什么?
I have a problem with making apprequests for my website application. I can send invite with FB.ui "apprequests" method but this request is not shown on Facebook. It looks like it is blocked because it fires notification icon but in a second notification disappears.
I've found a workaround. I set application also as a canvas and make redirection from canvas to the website page. But I don't know if it will not be blocked or something in the future.
What is the recommended method to send an application requests from a website application?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
根据我的经验以及阅读 Facebook 开发人员指南,您似乎必须拥有为您的 Facebook 应用程序定义的画布,以便请求呈现为通知。
我正在尝试解决以下问题:这些通知在 Facebook 网站中显示正常,但在 Facebook Android 客户端的通知弹出窗口中显示不正常。
From my experience and from reading the Facebook Developer Guide, it seems like it's mandatory for you to have a Canvas defined for your Facebook app so the requests render as Notifications.
I am trying to solve a problem where these notifications show fine in the Facebook website but not on the Facebook Android client's notification popup.
我个人使用这段代码,它有效:
我希望这会对您有所帮助。
I personnally use this code, that works :
I hope this will help you.
经过一些研究和尝试/错误,我发现你必须使用画布。
因此,为了让我的用户离开画布并进入我的网站,我创建了一个静态登录页面,其中包含一个带有“target='_blank'”标记的大型“开始”按钮超链接。这会将我的网站打开到一个新的浏览器窗口中。然后,我使用该静态登陆作为我的“Facebook 上的应用程序”的“CanvasURL / Secure Canvas URL”
After a bit of research and trial/error, I found that that you must use canvas.
So, to get my users out of canvas and onto my site, I created a static landing page with a large "Get Started" button hyperlink with a "target='_blank'" tag. This opens my site into a new browser window. I then used that static landing as my "CanvasURL / Secure Canvas URL" for my "App on Facebook"