【问题标题】:Can't post an image extracted from ImageView on Facebook on ios with Titanium无法使用 Titanium 在 iOS 上的 Facebook 上发布从 ImageView 中提取的图像
【发布时间】:2015-12-17 11:45:50
【问题描述】:

我正在尝试将一些 facebook 功能添加到应用程序中,并且正在进行一些测试。 我想将 ImageView (self.iconImage) 转换为 blob 并发布 到脸书。 但是我收到了这个错误:

[错误] : message = "*** 集合 <__nsdictionarym:> 在枚举时发生了变异。";

这是代码。

shareView.addEventListener('click',function(){
      var blob = self.iconImage.toImage(); // I have tried also toBlob
      var fb = require('facebook');
      fb.permissions = ['publish_actions'];
      fb.initialize();
      if(!fb.loggedIn)
        fb.authorize();

      function postPoi(){
          var post = {picture: blob, caption:"test",message:"test"};
          fb.requestWithGraphPath('me/feed',post , "POST")});   
      }
      fb.addEventListener('login', function(e) {
        if (e.success) 
            postPoi();  
      });   
});

错误与 blob 有关:如果我从帖子对象中删除图片,我可以发布到 facebook。 任何想法如何解决这个问题?

【问题讨论】:

    标签: ios facebook-graph-api titanium


    【解决方案1】:

    您使用的是什么版本的 Titanium SDK 和/或 Facebook 模块?这已由 Titanium SDK 4.0.1 和 Facebook 模块 4.0.4 中的 https://jira.appcelerator.org/browse/TIMOB-18916 修复

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-24
      • 2014-08-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多