New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TIMOB-5994 - Facebook #722
Conversation
…e into timob-5994
…tch the other platforms more closely.
…e into timob-5994
|
||
// Sanity check | ||
if (_appid == null) { | ||
console.debug('App ID not set. Facebook authorization cancelled.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this should be logged as an error and probably an exception thrown since it's a programmer error, not a runtime error.
} else if (response.error) { | ||
callback({'success':false,'error':response.error,'path':path,'source':Titanium.Facebook}); | ||
} else { | ||
callback({'success':true,'result':response,'path':path,'source':Titanium.Facebook}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these callback() calls fail because "path" is undefined. Is path supposed to be action?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy paste error
…a commonjs module.
…e into timob-5994
…e into timob-5994
api.requestWithGraphPath = function(){ | ||
console.debug('Method "Titanium.Facebook.requestWithGraphPath" is not implemented yet.'); | ||
api.requestWithGraphPath = function(path,params,httpMethod,callback){ | ||
if (!_loggedIn) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If not logged in, there's no way to know if the request failed. You should fire callback with success false.
if (!_loggedIn) { | ||
callback({ | ||
'success' : false, | ||
'error' : 'must be logged in to call Titanium.Facebook.dialog', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error message is overly verbose. "Not logged in" would be sufficient.
…e into timob-5994
…e into timob-5994
…e into timob-5994
…l authorized is called, thus making the time that FB.init() is called predictable (and thus when the app id must be set by predictable).
…ppID has been set, when possible.
Ok, now we have the old behavior (auto-login), but now it's done in a safe way that should avoid the issue of appID being set late. |
Wow, wonder why I did that? Oh well, it's fixed. |
Oh snap. Missed that in my testing. It's just a theoretical case where app_id is set before the div loads, so it's really hard to test in practice. |
Reviewed and tested. Request accepted! |
Reviewed. Request accepted. |
No description provided.