Facebook 3.1.1 SDK breaks A LOT

There’s still a bug in 1030:

The operation couldn’t be completed. (com.facebook.sdk error 5.)

Steps to reproduce

  1. Login with facebook
  2. Turn off internet connection
  3. Try to do something with Facebook (request me/friends for instance)
  4. Fails with error 5
  5. Turn on internet connection
  6. Try to do something with Facebook (request me/friends for instance)
  7. Result: Facebook is now completely borked, the only way to restore Facebook operations is to exit the app and start anew.

Can the developer responsible for the facebook integration PLEASE put some pride in making a robust facebook implementation and actually TEST it? Unbelievable that we have to go so many rounds. [import]uid: 21746 topic_id: 34416 reply_id: 142912[/import]

Here’s a quick update regarding the daily build 1030 as it applies to my project – it’s working perfectly for me! I tested all possible route, and everything is working smoothly. At this point, I don’t expect any aspect of FB in my app to break. Woohooo!! Thanks for the fix!

Naomi [import]uid: 67217 topic_id: 34416 reply_id: 142933[/import]

You could just check for connectivity before you do any Facebook commands, if no connectivity then display message (which you should do anyway) not perfect but would solve it most of the time. [import]uid: 8697 topic_id: 34416 reply_id: 142937[/import]

@cublah, yes, I know. The problem is that exceptions in the sdk/integration completely breaks all FB functionality, and Corona needs to handle it.

I’ve implemented the workarounds needed, and we’re using daily 1027, so right now everything works as it should for us. We’re stuck at 1027, though, until Coronalabs fixes the native share dialog. The network bug is fixed like you suggested and can stay like that. [import]uid: 21746 topic_id: 34416 reply_id: 142938[/import]

@haakon, all calls to FBSession on the Corona side are silo’d in the plugin. So as long as you don’t require our facebook library, you won’t call into the plugin, thereby avoiding any conflict.

And from what you say, it looks like you are using our plugin alongside yours, so that explains your issues. [import]uid: 26 topic_id: 34416 reply_id: 142939[/import]

@walter,

the error I found is not related to mixing 2 plugins. Mixing the plugins only affects the native share dialog.

I guess the only way we’ll get facebook integration WITH native share dialogs is to roll our own Facebook plugin from scratch? I was kind of hoping not having to do that, since you have already integrated with Facebook. Our plugin has just got the native share dialog implemented, not anything related to login, sessions or posting stuff to facebook… [import]uid: 21746 topic_id: 34416 reply_id: 142943[/import]

Fixed. Rewrote the plugin to use iOS functionality instead of Facebook functionality:

SLComposeViewController\*fvc = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];  
  
...  

With that we were able to switch to daily 1030 and continue presenting the users with native share dialogs. [import]uid: 21746 topic_id: 34416 reply_id: 143042[/import]