Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3270] iOS: Facebook Dialog Crashes when nothing is in the callback function

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionInvalid
Resolution Date2011-05-18T15:29:15.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.7.0
ComponentsiOS
Labelsdefect, facebook, ios, reported-1.6.0, rplist
ReporterRick Blalock
AssigneeStephen Tramer
Created2011-04-15T03:41:00.000+0000
Updated2011-05-18T15:29:15.000+0000

Description

The below code will crash every time:

Titanium.Facebook.dialog('feed', data, function(e){                   
});

However this will not crash:

Titanium.Facebook.dialog('feed', data, function(e){
   if (e.success) {
      Gum.log('Facebook Result was = ' + JSON.stringify(e.result));
   }                        
});

Exception:

2011-03-04 13:15:38.165 LA Times[64028:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFString context]: unrecognized selector sent to instance 0xf5232f0'

HD ticket related here: http://developer.appcelerator.com/helpdesk/view/75721">http://developer.appcelerator.com/helpdesk/view/75721

A full code snippet of our scenario is the following:

var data = {
    link: article.getUrl(),
    name: article.getTitle(),
    message: "",
    caption: article.getCredit(),
    picture: article.getLeadPhoto() != null ? article.getLeadPhoto().getThumbnailUrl() : "",
    description: article.getBrief()
};
Titanium.Facebook.dialog('feed', data, function(e) {
    if (e.success) {
        Gum.log('Facebook Result was = ' + JSON.stringify(e.result));
    }
});

Comments

  1. Rick Blalock 2011-04-15

    Hey Steve,
    I can't duplicate this anymore in my test app. Maybe we can hold off for this right now until I get more information to you.

  2. Stephen Tramer 2011-04-15

    Pushed back until Rick can offer me further information; I've been unable to duplicate.

  3. Rick Blalock 2011-04-15

    This is closed. User error by confusing the Dialog with the Graph method.

JSON Source