Vue based Telegram Web App opens page outside of Vue path in Browser - telegram-bot

I have a Vue-based Telegram Web App (API 6.x), which opens in Telegram App, clicking on the for Bot defined Button.
Now inside of the (one page, no router) Vue app I need to bring user to another, non-vue-based page.
Vue App > domain.com/game
Link to > domain.com/game/win
// inside vue component
<button #click="participate()">Participate Winning Game</button>
Participate Winning Game
As soon the User clicks on the link (or I do in participate() window.location.href/replace), Telegram asks the user to open /gam/win in Browser.
Is there a way to avoid this behavior and load /game/win inside the Telegram App?

Earlier I faced the same problem. Telegram Web App for Bot suggests opening any links in an external browser. I did not find documentation on the work of links in the application.
In my application on JS, I implemented a page redraw with new data received from the backend.
P.S. links to phones or other messengers like
Telephone
Skype
do not work at all.

Related

Track user from web page to app install & open

I have a requirement where there is a promotional mobile web page where the user can click to download and install the app via AppGallery. When the user opens the app it should display custom content and record that back to our API based on the tracking ID (coming from the web page).
If the user installed the app normally (eg. didn't go through the promo page) then no custom content displayed.
How can the app know that it was installed and opened via a promo web page?
I'm using react-native.
You can embed the AppLinking hyperlink in the promotion page to implement this function.
For Detail,pls kindly refer:https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-applinking-applicationscenarios-0000001054263231?ha_source=hms1
Hope this could help with your issue. :)

3r Party AuthProvider - callback url redirect

My project includes the firebase sign-in methods: Twitter, Facebook, Google and Github.
I am using firebase.auth().signInWithPopup() to handle authentication and callback. It works fine when run in the browser:
in mobile, this is different. I realize that it opens a new safari window, but it does not redirect to the app home screen. How can we do that?
this is the project in the firebase console for the Facebook sign-in
I believe this is a known issue for home screen apps in iOS. The window that is opened is sandboxed from the home screen app. The popup is unable to pass back the result to the parent home screen app. Instead, you should use signInWithRedirect in that mode. I believe that should work.

How to pass Login With Google Process in Cocoa WebView

I am developing a cocoa app for Mac OSX. It's a basic browser application and I use webview component.
In the page I want to connect, there is standard Login with Google Account button in order to login with my existing Google Account. When I clicked on this button nothing happens.
The same functionality works properly when I visited the same page by using Safari or any other browser but there is no reaction on webview component.
I've checked the action behind the Google's login button and here is the JS code.
onclick="return Dialog.Login.loginWithGoogle(false, 'https://www.mywebsite.com/-/oauth2callback', 'https://www.mywebsite.com/')"
As a part of the standard oauth process the process also has many redirections after this URL is called and normally should be completed at my site's login screen as expected. However, webview doesn't handle this.
Please note that the web site I am trying to connect in my webview is not belong to me and I have no control on it.
I checked many solutions on the web for 2 days but nothing helped.
Any help/hint will be appreciated.

How to do FB feed share post without leaving my hybrid app?

I am making mobile app using Sencha touch which will be bundled as native app and installed on devices. In my app on certain pages I want to add "share" functionality which is supposed to post some data to user's feed. While testing on browser I can to do that by opening a window with FB sharing url like "https://m.facebook.com/dialog/feed" or "https://m.facebook.com/sharer.php" and passing all related params as explained in https://developers.facebook.com/docs/reference/dialogs/feed/
But when this app is bundled and I share with this, user is moved to browser and cannot return to app because redirect_uri cannot point to app which is why I wanted to open this dialog within my app, probably in an iFrame. This is also not possible because these dialogs are not allowed to be embedded in iframe by META tags and in order to surpass it I have to do user login which again is another dialog which I cannot open in my app's iFrame.
I also looked at sample sencha app http://blooming-day-7830.herokuapp.com/ but it also takes user to separate login page instead of opening in-app dialog.
So my questions is how does hybrid apps connect with FB without moving out user to browser?
if you decide to use PhoneGap you can try the following two options. You will have to check for the iOS version before you switch your Phonegap call to. . .
Option 1 : for iOS before 6.0
Phonegap has a pretty nifty ChildBrowser plugin that you can use to load the FB share page without leaving the app for iOS 5.0 and below.
Option 2 : for iOS 6.0+
Facebook Share functionality has now been added to iOS. So all you have to do, is call a custom plugin class that you create, and call the standard FB share code using a basic Phonegap plugin call. You won't leave the app, the ChildBrowser doesn't have to show up, instead, you'll get the stock iOS-FB share sheet that will show up, you can add pictures, text, and so on, and post to facebook.

How does new Facebook App integrates App Store page?

Since some weeks Facebook displays ads for apps in their iOS client. When you click on them the App Store apps detail page opens as a modal view controller inside the Facebook app.
I only know how do open App Store pages via their URL, but how to show a App Store page from inside your app?
You're looking for the SKStoreProductViewController. Here is a link to the docs :)
https://developer.apple.com/library/ios/documentation/StoreKit/Reference/SKITunesProductViewController_Ref/SKStoreProductViewController.html
I also found this helpful tutorial :)
http://www.techotopia.com/index.php/Making_Store_Purchases_with_the_SKStoreProductViewController_Class