title: Cordova integration of branch.io for invite to app
body: <p>I want to use branch.io to create invite links within a cordova app. So I installed the plugin. </p>
  
  <p>in app.js:</p>
  
  <pre><code> branch.init(branchIoKey, function(err, data) {
       console.log(err);
       console.log(data);
    });
    $ionicPlatform.on("resume", function(event) {
        console.log('app resume event', event);
        branch.init(branchIoKey, function(err, data) {
            console.log(err)
            console.log(data);
        });
    });
  </code></pre>
  
  <p>So far so good. I also get some result here.</p>
  
  <p>EDIT start:</p>
  
  <p>Of course I set the identity after successful registration / login. So a user is always unique.</p>
  
  <p>EDIT end.</p>
  
  <p>But from then I have absolutely no idea:</p>
  
  <p>1) How do I get the invite link for the current user which he can share via Mail, Twitter, Facebook, SMS etc. ?</p>
  
  <p>2) How do I detect in the other device whether the app was installed through such a branch.io invite link?</p>
  
  <p>3) How do I create such a beautiful Welcome Page with foto and name of the referrer if I detect such a link?</p>
  
  <p>The documentation of branch.io is more less a rough install guide plus API documentation. Not sufficient enough as sample code for this case is not included anywhere. At least I found no hint.</p>
  
  <p>On their page they have 4 steps: SHARE, CLICK, DOWNLOAD, PERSONALIZE.
  Last point is not covered. </p>
  
  <p>I just want to reward the referrer with some in app credtis for each successful invite.</p>