如何处理扩展权限对话框

发布于 2024-10-05 12:13:33 字数 842 浏览 0 评论 0原文

我使用 restfb 来检查用户的扩展权限。我点击允许权限对话框下次就不会再弹出了。但是,我在权限对话框上单击“不允许”,每次访问此页面时都会将其恢复。我不想。我希望单击“不允许”时将永远停止对话框。请建议我一种方法

这是我的代码:

Java源代码:

public boolean getCheckExtPerm() throws FacebookJsonMappingException, FacebookException {
    Integer emailPerm = getFbClient().execute("users.hasAppPermission", getFbSigSessionKey(),
            Integer.class,Parameter.with("ext_perm", "email"));
    return emailPerm == null ? false : emailPerm.equals(new Integer(1));
  }

查看源代码:

 <script type="text/javascript">
      var checkExtPerm = <s:property value="checkExtPerm" />;
      if (checkExtPerm == false) {
        Facebook.showPermissionDialog('email', function (perms) {
          //if (perms == "email" ) {}
        });
      }
  </script>

I used restfb to check extended permissions of user. I click allow permission dialog will not pop it up again next time. However I clicking "Don't Allow" on the permission dialogue box will bring it back up every time when this page is accessed. I don't want. I want when Clicking "Don't Allow" will stop the dialog forever. please suggest me a way

Here is my code:

Java source:

public boolean getCheckExtPerm() throws FacebookJsonMappingException, FacebookException {
    Integer emailPerm = getFbClient().execute("users.hasAppPermission", getFbSigSessionKey(),
            Integer.class,Parameter.with("ext_perm", "email"));
    return emailPerm == null ? false : emailPerm.equals(new Integer(1));
  }

View source:

 <script type="text/javascript">
      var checkExtPerm = <s:property value="checkExtPerm" />;
      if (checkExtPerm == false) {
        Facebook.showPermissionDialog('email', function (perms) {
          //if (perms == "email" ) {}
        });
      }
  </script>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谷夏 2024-10-12 12:13:33

我认为这是不可能的。

为了更好 - 如果用户错误地单击“不允许”会发生什么?下次他应该能够允许访问。

您可以在自己的应用程序中执行此操作,如果用户拒绝访问,则根本不触发对话框。

I don't think this is possible.

And for the better - what happens if the user clicks "don't allow" by mistake? Next time he should be able to allow access.

You can do this in your own application, by not triggering the dialog at all if the user has denied access.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文