deep linking - Branch.io inetegration with cordova / ionic 1 app. Shared link generated by branch for snapchat does not show image preview and the link not clickable -


we have used branch.io implementing deep links in our mobile hybrid app developed using ionic 1 framework. have used branch-cordova-sdk plugin , configured deep links sharing social media apps. passing title, description , contentimageurl branch.io create link. works great on sm platforms except snapchat.

when content shared on snapchat, link showing along content not clickable snapchat. there no preview of image shown. not find solution yet. please see code down below in reply. thanks.

here code i'm using:

 var branchuniversalobj = null;          var props = {};              props.canonicalidentifier = 100;              props.title = "my title";              props.contentdescription = "my description";              props.contentimageurl = "http://lorempixel.com/400/400/";              //create branch object             branch.createbranchuniversalobject(props).then(function (res) {               branchuniversalobj = res               console.log('response: ' + json.stringify(res))             }).catch(function (err) {                console.log('error: ' + json.stringify(err))             }); 

somewhere in code:

        var analytics = {               campaign: "sharing cards"              }           var properties = {               cardid : 100,               cardtype: "promo",               refuser: "john"                   }              // share sheet             branchuniversalobj.showsharesheet(analytics, properties, "hello awesome stuff"); 

when share branch link on various social media platforms, scraped display og related information (i.e. og title, og image , og description).

when scraped, branch return: 1st: og parameters have been defined link; 2nd: og parameters have not been defined link have been defined @ app level (in social media display customization on link settings page); , finally: meta tags present on web site specified in default url ($fallback_url) page.

in order, ensure og image displayed correctly, need ensure have og parameters defined @ atleast 1 of 3 levels mentioned above.

here various ways set og tags

  1. to add og_image particular quick link on dashboard:

    • visit quick links page on dashboard.
    • click on 'create new link'
    • on 'configure options' tab , 'social media' section either add og_image or og_image_url.
  2. while creating links iconic sdk add image url branch universal object using contentimageurl tag shown below:

code snippet

var properties = {     canonicalidentifier: 'content/123',     canonicalurl: 'https://example.com/content/123',     title: 'content 123 title',     contentdescription: 'content 123 description ' + date.now(),     contentimageurl: 'http://lorempixel.com/400/400/',     price: 12.12,     currency: 'gbd',     contentindexingmode: 'private',     contentmetadata: {         custom: 'data',         testing: 123,         this_is: true     } }  // create branchuniversalobj variable reference other branch methods   var branchuniversalobj = null   branch.createbranchuniversalobject(properties).then(function (res) {         branchuniversalobj = res         alert('response: ' + json.stringify(res))     }).catch(function (err) {             alert('error: ' + json.stringify(err))  }) 
  1. to set these og tags default branch links:
    • go link settings page on dashboard:
    • scroll down "social media display customization" section
    • set link title, description , image. here screen shot reference.

ps: final caution, make sure image specify og image adheres snapchat accepted image dimesions, belive 1080 x 1920 pixels.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -