socialize / socialize-titanium-ios

!!!NO LONGER SUPPORTED!!! Titanium Module for the Socialize iOS SDK
http://www.getsocialize.com
Other
15 stars 6 forks source link

Better Error handlining and initialization of socialize object #3

Open aaronksaunders opened 12 years ago

aaronksaunders commented 12 years ago

As stated in the other issue, there is not integration for user account.

I also do not see error events being handled gracefully.

I might suggest a flow similar to this?

var socializeiostitanium = require('com.getsocialize.titaniumios');
Ti.API.info("module is => " + socializeiostitanium);

socializeiostitanium.initialize({
   apiKey: "your apiKey",
   apiSecret : "your apiSecret",
   facebookAppId : "your facebookAppId"
});

// then catch success or failure events

// the create the toolbar
nwg commented 12 years ago

It is not quite this simple, because the authentication does not happen until later on (when the action bar is displayed).

Which error condition specifically did you have in mind?

aaronksaunders commented 12 years ago

i might suggest just having error handlers for starters? the way module is currently structured there is no feedback at all when things go wrong.

you can set the error handler on the initialize or the create of the actual toolbar.

nwg commented 12 years ago

I guess i would implement this with a single, global catchall javascript function reference that is passed in at module init time, and called with an error object if anything goes wrong.

Do you think developers would be happy with that architecture? I should admit that i am a little ignorant of javascript best practices...

aaronksaunders commented 12 years ago

That is not really how an Appcelerator dev would expect it to work.

The would expect a callback for success and error or just one call back for each call that can respond with success if failure.

You could module it after the Facebook module?

I am on my phone now, when I get near a computer I will and a better explanation with a code snippet which might explain it better

On Jan 16, 2012, at 4:39 PM, Nathaniel W Griswoldreply@reply.github.com wrote:

I guess i would implement this with a single, global catchall javascript function reference that is passed in at module init time, and called with an error object if anything goes wrong.

Do you think developers would be happy with that architecture? I should admit that i am a little ignorant in javascript best practices...


Reply to this email directly or view it on GitHub: https://github.com/socialize/socialize-titanium-ios/issues/3#issuecomment-3518763