Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70747

SocialShare plugin is not working with InAppBrowser Plugin (it crashes)

$
0
0

@temohpab wrote:

Ok, here’s my scenario:

I’m trying to implement this functionallity, i’m showing a web app of my own with InAppBrowser and i have a share button…

I’m trying to hide the inAppBrowser window and show the share window with SocialSharing if i click that button, something like this:


this.browser = this.iab.create('http://mysitecom/', '_blank', 'hidden=yes');
    this.browser.show();
    this.browser.on('loadstop').subscribe((event)=> {
      if(event.url === 'http://mysite.com/share'){
        this.socialShare();
      }
    });
    this.browser.on('loadstart').subscribe((event)=>{
      console.log('Loadstart');
    });

socialShare(){
    this.browser.hide();
    this.socialSharing.share('Discover my site, 'The awesome site', null, 'http://mysite.com')
      .then((value)=>{
        this.browser.show();
      })
      .catch((value)=>{
        this.browser.show();
      });
  }

This makes my app crash and i don’t know why, i think it’s a high level issue, i read this article but i don’t find a solution

https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin/issues/396

Thanks

Edit: FInally i fixed it in the only way possible… Setting a timeout after close the inappbrowser’s window

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70747

Trending Articles