Socialplugin share callback function

How can I properly use the callback function for the social sharing plugin? I’m not seeing the forrest because of all the trees.

SocialSharing.share(message, title, null, link).then(
    function(){
       console.log('share success');
       this.property = true;
    },function(){
       console.log('share fail');
       this.property = false;
    }
);

I need to access a property of the current view controller this. How do I make sure this is available in the callback namespace for the social plugin share function? Right now it’s undefined…

Resolved it by wrapping the share promise into a Observable.fromPromise