I need to promote Viber bot with deep link on Facebook (I need to post deep link in Facebook post or to connect to some call to action button). As look like, deep links and Viber are not familiar with Facebook. So deep link for Viber is like:
viber://pa?chatURI=somebotname
When I post on Facebook it is like a string with no action or if I connect to call to action button it is not accepted as proper web address. So I'm looking for solution how to satisfy Facebook.
Somehow I think I can call AWS Lambda function handler response to open that deep link.
As far as I red, I should make one of the responses of Lambda handler is to redirect to that deep link. I'm not sure is it the right way, so I need advice, or have some other way to force opening new page through AWS Lambda function. I try to do as follow:
exports.handler = async function(event){
switch(true) {
case input.includes("some parameter"):
result = {
statusCode : 301,
headers : {
Location : "viber://pa?chatURI=somebotname"
}
break;
etc...
I found solution about about using deep links on Facebook. It seems to be the recommended way is to create URL shortener from deep link which can be used as URL link to connect to local Viber app. And it works fine.