MobiVM / robovm-robopods

55 stars 37 forks source link

FBSDKShare - Crash when implemented the share delegate. #52

Closed nnkdev closed 6 years ago

nnkdev commented 6 years ago

I want to get the callback results after posting on facebook. I follow the instructions to share photo on facebook. It works when the is not implemented share delegate . It's work with call cmd: FBSDKShareDialog.show (viewController, content, null);

I implemented Share Delegate as follows:

  1. Declare global variable: private FBSDKSharingDelegate sharingDelegate;

  2. In didFinishLaunching () method add: sharingDelegate = new FBSDKSharingDelegate () {             @Override             public void didComplete (FBSDKSharing sharer, NSDictionary <?,?> results) {                 log.debug ("IOSLauncher FBSDKSharingDelegate -> didComplete");             }

            @Override             public void didFail (FBSDKSharing sharer, NSError error) {                 log.debug ("IOSLauncher FBSDKSharingDelegate -> didFail");             }

            @Override             public void didCancel (FBSDKSharing sharer) {                 log.debug ("IOSLauncher FBSDKSharingDelegate -> didCancel");             }         };

  1. And call show: FBSDKShareDialog.show (viewController, content, sharingDelegate);

-> It is crash. Where do I implemented the wrong share delegate ? Please help me. Thanks.