【问题标题】:Appcelerator Facebook Module Error Posting Photo on IOSAppcelerator Facebook 模块在 IOS 上发布照片时出错
【发布时间】:2016-08-25 18:12:38
【问题描述】:

我在 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] :  }

有人对我做错了什么有任何想法吗?谢谢

【问题讨论】:

    标签: ios facebook appcelerator appcelerator-titanium


    【解决方案1】:

    对我来说似乎有效。我在这里为你创建了一张 JIRA 票:MOD-2286

    我们需要将快速迭代移除为经典迭代以避免突变问题。请关注票证并在那里提供反馈,谢谢!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-06
      • 1970-01-01
      • 2012-09-29
      • 2011-10-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多