我在5.4.0GA sdk上使用appcelerator的facebook模块的5.2.0版本。我可以使用以下代码发布到facebook的链接:
var data = {link: "http://www.stackfish.com" };
fb.requestWithGraphPath('me/feed', data,"POST",showRequestResult);
但是当我尝试使用示例代码发布照片时,我发现我发现了数组突变错误。这是导致IOS错误的代码(它在droid上运行正常):
if ( fb.getLoggedIn() == true )
{
// Ti.API.info('1.5.5 PostTo FacebookLogged In Perissions = ' + fb.permissions);
Titanium.Media.openPhotoGallery({
success:function(event)
{
var data = {picture: event.media, caption: 'test'};
Titanium.Facebook.requestWithGraphPath('me/photos', data, "POST", showRequestResult);
},
cancel:function()
{
},
error:function(error)
{
},
allowEditing:true
});
这是错误:
[ERROR] : Script Error {
[ERROR] : column = 2506;
[ERROR] : line = 1;
[ERROR] : message = "*** Collection <__NSDictionaryM: 0x14ee27430> was mutated while being enumerated.";
[ERROR] : sourceURL = "file:///var/containers/Bundle/Application/110C8EFE-A325-4D3C-A15C-AC0FFA89C418/Stackfish.app/alloy/controllers/PostReview.js";
[ERROR] : stack = "[native code]\nsuccess@file:///var/containers/Bundle/Application/110C8EFE-A325-4D3C-A15C-AC0FFA89C418/Stackfish.app/alloy/controllers/PostReview.js:1:2506";
[ERROR] : }
有没有人对我做错了什么有任何想法?感谢