Coder Social home page Coder Social logo

Comments (11)

jf-branch avatar jf-branch commented on May 27, 2024

Hi @deficts, could you provide additional detail as what you are referring too?

from capacitor-branch-deep-links.

deficts avatar deficts commented on May 27, 2024

So, in our app we implemented the deeplinking for sharing posts, that works well, but we want to be able to set a custom image in our deeplinks (right now when you share a deeplink the image shown, for example, in whatsapp is the icon of the app, but we want that image to be the image of the post). Tell me if im wrong but it is possible by customizing the contentImageUrl variable right? but in capacitor we are not able to access this variables, right? @jf-branch

from capacitor-branch-deep-links.

jf-branch avatar jf-branch commented on May 27, 2024

Thank you for the clarification @deficts. You can still do this through the capacitor SDK as well.
When creating your properties, you can simply use the key as identified on the Universal Object , $og_image_url.

i.e

// optional fields
var analytics = {
  channel: 'facebook',
  feature: 'onboarding',
  campaign: 'content 123 launch',
  stage: 'new user',
  tags: ['one', 'two', 'three']
}

// optional fields
var properties = {
  $desktop_url: 'http://www.example.com/desktop',
  $android_url: 'http://www.example.com/android',
  $ios_url: 'http://www.example.com/ios',
  $ipad_url: 'http://www.example.com/ipad',
  $og_image_url: 'http://www.example.com/image.png',
  $match_duration: 2000,
  custom_string: 'data',
  custom_integer: Date.now(),
  custom_boolean: true
}

BranchDeepLinks.generateShortUrl({ analytics, properties }).then(function (res) {
  alert('Response: ' + JSON.stringify(res.url))
}).catch(function (err) {
  alert('Error: ' + JSON.stringify(err))
})

from capacitor-branch-deep-links.

deficts avatar deficts commented on May 27, 2024

Great! are these properties available using the showShareSheet method too? Thanks for the clarification!! @jf-branch

from capacitor-branch-deep-links.

deficts avatar deficts commented on May 27, 2024

Also, I think the $og_image_url property is not defined in this SDK see: https://github.com/BranchMetrics/capacitor-branch-deep-links/blob/master/src/definitions.ts#L27-L36

from capacitor-branch-deep-links.

jf-branch avatar jf-branch commented on May 27, 2024

@deficts yes it will work for showShareSheet as well.

I'm nearly certain it doesnt have to be defined in definitions.ts.

from capacitor-branch-deep-links.

deficts avatar deficts commented on May 27, 2024

image

I think the property must be included in definitions otherwise the project won't compile @jf-branch

from capacitor-branch-deep-links.

jf-branch avatar jf-branch commented on May 27, 2024

Got it! Thanks for testing! I'll create an internal ticket to get this updated.

from capacitor-branch-deep-links.

deficts avatar deficts commented on May 27, 2024

Thank you for the attention and support!!!

from capacitor-branch-deep-links.

jf-branch avatar jf-branch commented on May 27, 2024

@deficts I'm gonna talk to the engineer on this, but I'm thinking about just making BranchShortURLProperties a [String:String] object, because the API can accept any key value pair within the nested 'data' dictionary as long as its String:String. https://help.branch.io/developers-hub/docs/deep-linking-api#sample-request---create

from capacitor-branch-deep-links.

deficts avatar deficts commented on May 27, 2024

@deficts I'm gonna talk to the engineer on this, but I'm thinking about just making BranchShortURLProperties a [String:String] object, because the API can accept any key value pair within the nested 'data' dictionary as long as its String:String. https://help.branch.io/developers-hub/docs/deep-linking-api#sample-request---create

That sounds good, I'll keep an eye for any update, thanks again!

from capacitor-branch-deep-links.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.