rubenfonseca / titanium-social

iOS6 Social module for Titanium
MIT License
11 stars 10 forks source link

error handling success #2

Open paomosca opened 9 years ago

paomosca commented 9 years ago

after many test, i cannot find where is the issue on facebook, because it's working correctly on some devices and failing to publish in some other:

this is the use case: logging in with facebook (using the new sdk) than create the accountstore:

var options = {}; options[Social.FACEBOOK_APP_ID] = 'my_app_id'; options[Social.FACEBOOK_PERMISSIONS] = ['publish_actions']; options[Social.FACEBOOK_AUDIENCE] = Social.FACEBOOK_AUDIENCE_FRIENDS; var store = Social.createAccountStore({ type: Social.ACCOUNT_FACEBOOK, options: options }); store.grantPermission({ granted: function(_res) { var composer = Social.createComposerView({ type: Social.FACEBOOK }); composer.addEventListener('complete', function(e) { alert(JSON.stringify(e)); });

   composer.setInitialText("#asdasd some text");
composer.addImage(oneblobimage);
composer.addURL('http://someurl.com');

if(composer.isServiceAvailable(Social.FACEBOOK)) {
          composer.open();
} else {
          alert("NO WAY");
}

} });

the answer i receive on complete is:

{"result":1,"bubbles":true,"type":"complete","source":{"type":"com.apple.social.facebook"},"cancelBubble":false}

so apparently everything ok...

but... on some profile it published the image... in some other... not... without throwing any error...

so? what i miss? i really cannot find one answer... i tried to ask for permission of publish_actions with the facebook native sdk, but nothing changes... some profiles can publish... other not.. and all the profiles are administrators on the app of facebook so, even if we are waiting for facebook approval for publish permission, it could works...

any hints?

paomosca commented 9 years ago

i've more information for you, maybe it will help to solve: using other app like instaplace or instagram with the same mobile give the same results... so facebook answer ok but... is not publishing the post.

so maybe there is a problem with the last release of IOS Facebook app (that is updated for ios8) but it's installed on ios 7.1.1...