Sharekit 2,用户身份验证后连接 Facebook 时出现问题?

发布于 2024-12-27 05:46:49 字数 250 浏览 2 评论 0原文

Sharekit 打开 Safari 以获取用户的身份验证,这很好(不确定是否应该打开 Safari 还是在它自己的窗口中)。然后会出现一个页面,显示您已验证 app.x 单击“确定”继续,点击“继续”按钮后,它会尝试重定向到 www.facebook.com/permissions.request,但随后显示错误:

“无法打开页面,Safari 无法打开”打开此页面,因为地址无效。”

有什么想法可能会发生在这里,我想它应该重定向到我的应用程序?!

Sharekit opens up Safari to get authentication from the user which is fine (not sure if it should open up Safari or in it's own window). A page then appears saying you have authenticated app.x click ok to continue, once the continue button is tapped it tries to redirect to www.facebook.com/permissions.request but then show an error of:

'Cannot Open Page, Safari cannot open this page because the address is invalid.'

Any ideas what might be going on here, I'm presuming it should be redirecting to my app?!

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

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

发布评论

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

评论(2

允世 2025-01-03 05:46:49

这是我对此问题的解决方案(我假设您使用的是 ShareKit 2.0):

我按照他们提供的指南配置了 ShareKit ShareKit 配置指南。换句话说,我对 DefaultSHKConfigurator 类进行了子类化,并在其中添加了所有必要的配置。

在我的应用程序委托中,我将配置类与 ShareKit 链接起来,如下所示:

DefaultSHKConfigurator *configurator = [[MYSHKConfigurator alloc] init];
[SHKConfiguration sharedInstanceWithConfigurator:configurator];

并从 SHKConfig.h 中删除了配置信息。我不知道为什么,但这有效。

  • 注意:如果您对更新 ShareKit 不感兴趣,您也可以通过不进行子类化并直接在 DefaultSHKConfigurator.m 中输入配置信息来逃脱;

如果您希望 Facebook 屏幕在应用程序内加载,而不是在 safari 中加载,您可以进入 Facebook.m 文件并将 safariAuth:YES 更改为代码> 到 NO

[self authorizeWithFBAppAuth:YES safariAuth:NO]; 

Here's my solution to this problem (I am assuming you are using ShareKit 2.0):

I configured ShareKit following the guide they provide ShareKit Configuration Guide. In other words I subclassed the DefaultSHKConfigurator class and added all the necessary configuration there.

In my app delegate I linked the configuration class with ShareKit like this:

DefaultSHKConfigurator *configurator = [[MYSHKConfigurator alloc] init];
[SHKConfiguration sharedInstanceWithConfigurator:configurator];

And removed the configuration info from SHKConfig.h. I don't know why but this worked.

  • note: you could also get away by not subclassing and entering the configuration info directly inside the DefaultSHKConfigurator.m if you are not interested in updating ShareKit;

If you wish the Facebook screen to load inside the app and not in safari you can get inside the Facebook.m file and change the safariAuth: from YES to NO:

[self authorizeWithFBAppAuth:YES safariAuth:NO]; 
二智少女猫性小仙女 2025-01-03 05:46:49

这里同样的问题,当我在 https://github.com/ShareKit 中完成步骤 5 后停止时/ShareKit/wiki/安装-sharekit

总是得到“safari无法打开该页面,因为地址无效”,

最后,通过完成所有步骤(1到7)解决了问题

没有更改声明[selfauthorizeWithFBAppAuth:YES safariAuth:YES];

Same issue here, when I stop after complete step 5 in https://github.com/ShareKit/ShareKit/wiki/Installing-sharekit.

Always got "safari cannot open then page because the address is invalid",

Finally, issue solved by complete all steps(1 to 7)

Have not changed the statement [self authorizeWithFBAppAuth:YES safariAuth:YES];

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