简体   繁体   中英

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. 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.

The problem is that the facebook login dialog has no cancel button.

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?

Many thanks.

If you are referencing source and not the bundle, you need to include the close.png. It looks for it in 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. You get a fbDidNotLogin: callback when you press the button.

You have to explicity import the file FacebookSDKResources.bundle into the Ressources folder in XCode. (copy-paste the file then drag-and-drop it in XCode, add as group)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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