问题
I'm doing a project using phonegap 2.4 and the latest facebook plugin
https://github.com/phonegap/phonegap-facebook-plugin
my problem is with posting to the user wall feed, I'm able to authenticate the user, get all the proper events for that, etc. but when I'm try to post to a feed (I'm doing the ask for read first then write permissions sequence due a new api inside ios6 and have the publish permission for the user and also I have setup my facebook account on settings, ah and also I I'm using facebook sdk 3.1) the console just trough and error
***** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[__NSCFDictionary removeObjectForKey:]: mutating method sent to immutable object'**
is trying to remove and object from and inmutable dictionary, but why? where? how to solve this?
this what my js methond is trying to do
var params = {
method: 'feed',
name: 'Facebook Dialogs',
link: 'https://developers.facebook.com/docs/reference/dialogs/',
picture: 'http://fbrell.com/f8.jpg',
caption: 'Reference Documentation',
description: 'Dialogs provide a simple, consistent interface for applications to interface with users.'
};
FB.ui(params, function(obj) { console.log(obj); });
the error is when is calling FB.ui()

I really don't know what to do, or where I can start looking, thanks for any help!!!
回答1:
This is caused by a bug in the FacebookConnect plugin following the Cordova 2.4.0 release (which uses NSJSONSerialization, and so returned objects are now immutable).
A pull request has been made on Github which contains the fixes: https://github.com/phonegap/phonegap-facebook-plugin/pull/251
In the meantime, you could manually make the following changes to FacebookConnectPlugin.m:
Replace line 284:
NSMutableDictionary *options = [[command.arguments lastObject] mutableCopy];
Add the following after line 310:
[options release];
来源:https://stackoverflow.com/questions/14961475/phonegap-facebook-plugin