Comments (3)
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.
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.
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)
- The app does not return to the previous state after logging in on the Facebook app login screen. HOT 1
- Vision OS Support
- To make maps a friend sone and I will make it wear all whu are friends know, infarct I would like to make it avatar wourld HOT 1
- Profile picture URL returns 404 HOT 1
- swift version issues HOT 2
- Not able see Facebook live in iOS WKWebView HOT 3
- Asset validation failed - Error while archiving and distributing the app with FBAudienceNetwork
- App release failing with v16.3.1 HOT 7
- login error HOT 2
- `FBSDKInternalURLOpener` causing app to bounce back without sharing to Facebook App HOT 1
- Feature Request:
- outdated documentation https://developers.facebook.com/docs/ios/getting-started
- Feature Request:
- Infinite requests to the graph API HOT 9
- Cannot override 'appLink' which has been marked unavailable: Not available in app extension
- Facebook Login: Invalid Scopes: openid HOT 2
- Login interface abnormal when Facebook is not installed(iPad Pro 2020,iOS 13.7)
- GraphRequest.start { connection, result, error } doesn't complete after the app is deauthorized from account
- How to make App Events work in Events Manager. IOS 14.5+
- `FacebookCore` crashes at runtime when updating Facebook SDK from `14.1.0` to `16.3.1` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from facebook-ios-sdk.