Comments (11)
Hi @deficts, could you provide additional detail as what you are referring too?
from capacitor-branch-deep-links.
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.
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.
Great! are these properties available using the showShareSheet method too? Thanks for the clarification!! @jf-branch
from capacitor-branch-deep-links.
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.
@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.
I think the property must be included in definitions otherwise the project won't compile @jf-branch
from capacitor-branch-deep-links.
Got it! Thanks for testing! I'll create an internal ticket to get this updated.
from capacitor-branch-deep-links.
Thank you for the attention and support!!!
from capacitor-branch-deep-links.
@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 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)
- Provided for backwards compatibility for Capacitor v2 plugins. Capacitor v3 plugins should import the plugin directly. This "Plugins" export is deprecated in v3, and will be removed in v4. HOT 1
- Plugin incompatible with Gradle 8 HOT 10
- Problems with play-services-ads version HOT 7
- Can't generate deep link Error: BranchDeepLinks does not have web implementation HOT 1
- iOS Status 200 error (null) HOT 3
- getLatestReferringParams HOT 2
- Can I use Branch Universal Object?
- Android > Error: Session initialization already happened > No deeplink referringParams HOT 8
- Doc has not been updated to the Capacitor 3 yet HOT 4
- no setup docs for old versions
- iOS Network Request Invalid HOT 3
- Android Fatal Error - "You need to use a Theme.AppCompat theme" HOT 1
- Plugin crashes on ios 12 HOT 2
- Capacitor 4 support HOT 8
- 'scanInt32(representation:)' is only available in iOS 13.0 or newer HOT 5
- upgraded project to capacitor 4, ionic/xcode project will not compile HOT 2
- IOS Build not passing with version 5.0.0 of the plugin HOT 3
- Please update documentation HOT 3
- Make compatible with Capacitor 5 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capacitor-branch-deep-links.