URL Button with Messenger Extensions always redirect to fallback_url - facebook-javascript-sdk

Working on a facebook messenger chatbot, I try to use Webview and Extensions to display enhanced content (in my case, a datepicker).
As describe in documentation, I send a URL Button with Messenger Extensions message, with a fallback_url to handle browser users.
{
'type': 'web_url',
'url':'https://abcdef.localtunnel.me/html/chatbotDatepicker.html',
'title': 'Pick a date',
'webview_height_ratio': 'tall',
'messenger_extensions': true,
'fallback_url': 'https://abcdef.localtunnel.me/html/chatbotError.html'
}
On my Android phone, everytime I click on that button, it properly open my webview but always and only using the fallback_url. If I remove the fallback_url it will use url as expected but then Facebook Javascript SDK only trigger errors 2071011 (like this one Messenger Extensions Javascript SDK Error 2071011).
I feel like messenger_extensions might be disable, but I couldn't find any reference in documentation about enabling or disabling it.
May be this is related to the fact my application is public (has been reviewed by facebook), but I don't think so.
Does anyone ever had a similar problem, and know how to fix this ?! Thx a lot.

its a valid bug and facebook team is working on it.Here is link to that https://developers.facebook.com/bugs/1676913532599603/

Related

Firebase dynamic link open-graph not showing on discord

I have Firebase dynamic links set up in my react-native app on both IOS and Android, and they work perfectly except for the open-graph part which works on all social platforms but not on Discord. I want it to work on Discord too.
From what I understood from Firebase links docs, the open-graph part is controlled by the social property, so I have specified it like this:
social:
{ title: `Post by Yuniac`,
descriptionText: 'Jesse Faden, the bureau director',
imageUrl: 'https://hunt-public.s3.us-east-2.amazonaws.com/hunt_logo.png'
},
When sharing the Firebase dynamic link on social platforms:
Output on WhatsApp:
Output on Discord:
I tested it on Facebook and Twitter, the links also show a preview there. On Discord, its just a plain link.
What I found online regarding this issue was happening to websites links, not Firebase links generated in a react-native app, so the solutions were often something like:
"You are missing a <meta> tag in your <head> element that is responsible for the open-graph operation"
Or something similar, but nothing about my specific use case and besides there's no <meta> tags in react-native or in a Firebase dynamic link as far as I know, so those didn't help me.
I also stumbled upon people saying that: "Your server might be blocking Discord API" reference
reference2
Is this true? and if so how can I unblock it? we use amazon services but I'm not familiar with them. Or what could be the reason our links won't show their preview on Discord? Thanks.

Parsing ActionCodeSettings in iOS via dynamic link

I'm trying to direct the user directly back to my iOS app when they sign up for a new Firebase account and click on the verification link in their email, but I'm unable to access the parameters generated in the ActionCodeSettings.
I'm doing this via a dynamic link, and it does redirect the user back to my app, but the url params are not exposed. I have tried the AppDelegate code from the Firebase documentation here, but no luck.
I've seen mention of an applyActionCode method in Swift but if I can't even surface the query string from the link then there's nothing for me to pass to that method anyway.
Anyone ever deal with this before?

Can I create a Whitelist for Safari using OpenUrl in Xamarin.Forms?

I am working on a project using Xamarin.Forms as a container app. This app includes several webviews that link to restricted web content. One of these links our Sharepoint site. The Sharepoint site has a link that allows our users to go to a 3rd party site(Cornerstone) to view training videos. When using the stock UIWebView, WKWebView, or SFSafariViewController the popup that displays the video is not shown. The only way that I can get this video to play in my app is to use OpenURL to open the Sharepoint site in Safari. The problem is that this is an Enterprise solution where we don't want to allow the employees free reign with the browser.
Is there a way to create a whitelist or to have some control over the searchbar or read the url that they are linking to and block it or redirect the user?
Unfortunately as it's farming out the URL Navigation external to your application there's not a lot you can do from within your app to restrict what they do after the fact, 'openURL' only returns a Boolean value as to it's success, and the only parameters that you can send to it are:
application - Reference to this application
(UIApplication.SharedApplication).
url - The NSUrl specified by the
calling application.
sourceApplication - The bundle ID of the calling
application.
annotation -Optional property-list data passed by the
calling application.
You can only access these if you override the 'openURL' method within your 'AppDelegate.cs' class, there is a set of options you can pass through as an override but again none of those allow you to restrict what the user does after the browser has opened.
If the devices are managed using something like 'meraki' or some other software to control the use of managed devices, then you would likely set up a 'group policy' styled set of restrictions however that's not really a Xamarin issue, and should be discussed with the network administrators.
That being said, I don't see any reason why you can't use the WebView1, that way you can handle it all within your application. Or alternative utilize custom renderers and pass in the direct video urls and commit to opening up the devices media player for streaming the content2.
1 Playing videos in WebView
2 Using the media manager plugin.

Branch.io smart banner is empty

My team released an Android app and asked for a smart banner directing users from our website to the app and specific content; to complete this task, we are using branch.io.
According to this guide, I inserted the JavaScript snippet with the branch key found in the settings section of the dashboard and the SDK is correctly initialized.
In the dashboard we defined the styling of the banner and on which sites and devices it should appear. But the banner looks like this (on desktop):
No icon or text are set. Apparently when I use the preview link generated by branch.io it is displayed correctly.
Moreover when I initialize the banner via JavaScript and set the properties it is displayed correctly too:
branch.banner(Banner.options, Banner.data);
const deeplink = `${window.location.pathname}${window.location.search}${window.location.hash}`;
branch.setBranchViewData({
'$deeplink_path': deeplink
});
Somehow nothing from the dashboard is adopted.
Thank you for your help!
Alex from Branch.io here: the branch.banner() function and the banner you set up on the dashboard are actually separate things. The dashboard option replaced the banner() approach, which has been deprecated.
You'll want to review the full details in the set up guide. One important note is that the dashboard version does not yet support banners on desktop, as we found almost none of our partners were using that function.
Try smartbanner.js. Has a lot of custom options and behaviour at very low footprint (~ 13 KB). Takes a few meta tags to set up.

Is there a way to force WebView link clicks to open externally?

I've got a WebView component that's loading static HTML content:
<WebView
style={{flex: 1}}
html={content}
/>
The issue is, if someone taps a link, it opens in the app and I'd rather force it to use Linking to open in Safari. Is that possible?
After searching around a bit the only way I see to open a browser from an RN app is using the Linking or LinkingIOS API. The question then is, how to enable your Webview to use that API. Here are two possible solutions:
1) Register your own URL Scheme that is handled by your app. E.g. myApp://this/is/a/link.html. Then handle all incoming events for that scheme and make corresponding calls to the API. Registering a scheme is easy and works very well. That seems like the most robust method to me.
2) Use a library that lets the Webview directly talk to it's paren view. E.g. https://github.com/alinz/react-native-webview-bridge.
Then you put a little JS code in your page that onClick sends the link URLs to the parent view, that then calls the API. I have used that project a while ago and it work like a charm until one RN upgrade that I needed broke it. But it's still under active development so you should be fine.