Coder Social home page Coder Social logo

Comments (3)

yujuan avatar yujuan commented on April 19, 2024

The dialogDidComplete actually means the user click a button within the webView dialog and get the dialog go through. No matter the user click the Cancel or OK button. To see whether the dialog did succeed or not, if it is LoginDialog, the dialog fbDidLogin and fbDidNotLogin will corresponding to successfully log in or user cancel the login. For other dialog you would need to parse the url returned from the webView dialog by implementing the delegate method defined in FBDialog.h

  • (void)dialogCompleteWithUrl:(NSURL *)url;.

    For example, stream.publish, if succeed, the returned url will have a post_id appended to the url. We will have a document for all dialogs about what would be a succeed url. Check back with our facebook developer website.

Hope this explains. Thanks!

from facebook-ios-sdk.

jesseclark avatar jesseclark commented on April 19, 2024

It seems that it would be a pretty common requirement to need to know whether the dialog was closed because the user canceled or because the dialog completed the action it was intended for.

In the current API if the user clicks the x in the top right of a dialog the FBDialog method - (void)dialogDidCancel:(NSURL *)url gets called which subsequently calls the delegate method - (void) dialogDidNotComplete.

So it seems that there is some intention of letting the developer know that an action was cancelled. Perhaps it was just an oversite that the skip button doesn't similarly trigger this effect.

Regarding parsing the url in dialogCompleteWithUrl, the url returned by the publish dialog when the skip button is pressed seems to be "fbconnect://success" which doesn't do a very good job of indicating that the user chose to cancel an action.

Either way this API could stand to be improved quite a bit.

from facebook-ios-sdk.

jverdi avatar jverdi commented on April 19, 2024

We ran into this with ShareKit as well:
ShareKit/ShareKit#83

Seems there are issues open in Facebook's bug tracker for this:
http://developers.facebook.com/bugs/137604089677897?browse=search_4ec3715ee70598199320073
https://developers.facebook.com/bugs/153320298096609?browse=search_4ec373f2be1aa0313896178

It's referenced here on GitHub in issues:
#11 (closed) - #11
#74 - #74
#209 - #209

Please make it a priority to get a fix for this into the master repo.

from facebook-ios-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.