简体   繁体   English

我的应用程序显示了facebook登录对话框,并提示用户登录 - 如何从此对话框中取消?

[英]My app presents the facebook login dialog and user prompted to login - how can he cancel from this dialog?

When a user clicks the "post to facebook" button in my app, he is presented with the facebook login dialog. 当用户点击我的应用程序中的“发布到Facebook”按钮时,他会看到Facebook登录对话框。 If the user has no facebook account and does not want to register for one then I want to give him the option of exiting gracefully from the facebook login dialog and coming back to my app. 如果用户没有Facebook帐户并且不想注册一个帐户,那么我想让他选择从Facebook登录对话框中优雅地退出并返回到我的应用程序。

The problem is that the facebook login dialog has no cancel button. 问题是facebook登录对话框没有取消按钮。

What is the recommended approach for offering a "post to facebook" button, yet getting the user safely back to my app if they change their mind? 提供“发布到Facebook”按钮的推荐方法是什么,但如果他们改变主意,让用户安全地回到我的应用程序?

Many thanks. 非常感谢。

If you are referencing source and not the bundle, you need to include the close.png. 如果您引用的是源而不是bundle,则需要包含close.png。 It looks for it in FBDialog.bundle/images/close.png. 它在FBDialog.bundle / images / close.png中查找。

Just had the same problem, but the (unfortunately not so clear) hint of James Texter helped: 刚出现同样的问题,但詹姆斯·特克斯特的暗示(遗憾的是不那么清楚)有助于:

In your target's build settings you need to add FBDialog.bundle in the Copy Bundle Resources phase. 在目标的构建设置中,您需要在Copy Bundle Resources阶段添加FBDialog.bundle。 You get a fbDidNotLogin: callback when you press the button. 按下按钮时会收到fbDidNotLogin: callback。

You have to explicity import the file FacebookSDKResources.bundle into the Ressources folder in XCode. 您必须明确地将文件FacebookSDKResources.bundle导入XCode中的Ressources文件夹。 (copy-paste the file then drag-and-drop it in XCode, add as group) (复制粘贴文件,然后将其拖放到XCode中,添加为组)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM