ionic - Cordova integration of branch.io for invite to app -
i want use branch.io create invite links within cordova app. installed plugin.
in app.js:
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); }); }); so far good. result here.
edit start:
of course set identity after successful registration / login. user unique.
edit end.
but have absolutely no idea:
1) how invite link current user can share via mail, twitter, facebook, sms etc. ?
2) how detect in other device whether app installed through such branch.io invite link?
3) how create such beautiful welcome page foto , name of referrer if detect such link?
the documentation of branch.io more less rough install guide plus api documentation. not sufficient enough sample code case not included anywhere. @ least found no hint.
on page have 4 steps: share, click, download, personalize. last point not covered.
i want reward referrer in app credtis each successful invite.
i can out here! went , updated of documentation on our developer portal platforms support. until then, pretty bare bones. can see full extent of documentation there:
to answer questions:
- in order create links, need use
link()method.
below example full reference here:
branch.link({ channel: 'facebook', feature: 'share', data: { mydata: 'something', foo: 'bar', '$desktop_url': 'http://myappwebsite.com', '$og_title': 'check out app', '$og_description': 'my app disrupting apps.', '$og_image_url': 'http://myappwebsite.com/image.png' } }, function(err, link) { console.log(err, link); }); - in order detect whether device installed via branch link, need of custom control parameters conveniently bundle callback,
+clicked_branch_link.
here's example snippet shows how it's done:
branch.init("your branch key here", function(err, data) { if (!err) { var prettydata = json.parse(data.data); if (prettydata["+clicked_branch_link"]) { // stuff } } }); - we're in process of building awesome full stack invite sdk, in mean time, you'll have build yourself.
basically, i'd suggest loading the personal welcome view if detect user originates branch invite link. if stuff referring user's data link when create in go, can prefill personal welcome , show user's face if so.
Comments
Post a Comment