Facebook Canvas application anchor tags are not working properly? - ruby-on-rails-3

I'm developing a Facebook canvas application in rails 3.1 and using the latest Facebook graph API.
In anchor tags, when I give the href='/something' it's working nice when I navigate in same browser tab. The link is pointing to my host URL like host_url/something host_url contains HTTP as well , but when I open this anchor in a new tab using right click of mouse and chose to open in new tab it open the URL http://host_url/something and not in Facebook canvas.
I also change the anchor href with http://apps.facebook.com/my-app-name/something when I click this link nothing is displayed and request is no coming to my host. When I open this URL in new browser tab it works fine.
Can anybody tell me what I am doing wrong?

You're not doing anything wrong - if you're using relative links that's what will happen, because the app content is loaded in an iframe
Change your links to be absolute URLs including the apps.facebook.com/[namespace] prefix if you want them to always link to the canvas app when opened in a new window

Related

Issue trying to host docusaurus site on Sharepoint Online

I am trying to host a docusaurus site on a SharePoint Online library. I have followed this article: How to host static HTML sites on modern SharePoint site collections - HANDS ON SharePoint (handsontek.net)
It's almost working: when I use the URL of an index.aspx page (previously generated as index.html by docusaurus) the page opens in the browser, but only the navigation bar, left menu and the footer are displayed. The main content in the center is shown as 'page not found'.
If I then click on any link in the navigation bar, pages are correctly displayed. From there, the navigation between pages behaves as expected.
The pain point is that this issues prevents me from using links to single pages. One always have to navigate to a page using the menu.
Would anyone have a solution ?
I have tried the two trailingslash options, but no change.

Expo shared link is not clickable

I've been trying to create mechanism for my Expo app, that will allow users to share content of app (so I basically need linking with params, and I think I know how to do it, according to docs).
I wanted to start creating this mechanism with simple sharing, without params (just clickable link that opens app). Here's my code (executed when user presses share button):
share = async () => {
await Share.share({
message: Linking.makeUrl()
})
}
It shares link as excepted (I tried it on messenger), but shared link is not clickable. I also tried using exp://192.168.100.3:190000 that points to my PC in the same LAN (I coped that from http://localhost:19002/), where metro bundler is running, and copying Tunnel link - neither of those worked, link is just a plain text, and if user clicks on it nothing happens. But, when I scan QR code, from http://localhost:19002/ (metro bundler page) application opens as excepted.
You're doing everything just fine!
The reason why a shared link is not clickable in some apps is simply because of the mechanisms of the other apps for "detecting" links from plain text and "linkifying" them.
You see, these links are actually "deep links" (custom URL schemes).
Here's an example. If I share this link: exp://192.168.100.3:190000 over Slack, it becomes "clickable", because it looks like Slack has a mechanism to detect these custom "deep links" which lead to a mobile app:
If I share the same link over Messanger, it outputs it as a plain text. This is because Messanger doesn't have a mechanism to detect these "deep links".
In order for the link to "click", it must be rendered in an anchor tag. Messenger simply linkifies only "known" web links (http://, https://...), not custom ones.
The QR code reader in your case opens your deep link, because it has a mechanism to detect "deep links".
So, if you want a reliable way for making your links always "clickable", here's the workaround: spin-off a web site. When people generate (and share) links, they share web links https://your-server. When they open these links -> the web server redirects them with the exp://... (or your custom) scheme. If users have your app installed - the links will open with your app.

HTML IMA SDK - Custom click through

Requirement:
Show the Visit Website link for the VAST clickThrough. By default in we desktop, whole ima3 container is clickable and redirecting to clickThrough url. Is there anyway to show the clickThrough url like youtube?
Note
I have tried with custom click element. But it will only for web mobile. In the web desktop it won't work.
Demo Link:
codepen.io/anon/pen/jvVpvR
Just an update on this ticket, the user seem to contact goolgle ima sdk, and they say that is just not possible
https://groups.google.com/g/ima-sdk/c/xqDZvXuSJLE?pli=1

How to navigate to another HTML file without single DOM?

I have created a sample application with login page and home page.
i have loaded the login page as Main Page successfully and i have homePage.html/homePage.js files. What i need to do is, when i click on Login button from loginPage.html file, user should navigate to Home Page. I couldn't see any APIs fro navigate/load to different html files.
i referred some worklight samples it says loading on same HTML using div and pageport commands.
$("#pagePort").load("pages/homePage.html", function(){
alert("Home Page Loaded")
});
Can any one help me to get resolve, how we can load another html on click of login button?
Worklight is a single DOM application, hence the notion of "pages" is an artificial one.
You have 1 singular HTML file and what you need to do is replace content inside it to display different content, or "pages".
There are numerous ways you can accomplish this. None of them relate directly to Worklight, but to the framework you select to work with, be it jQuery, jQuery Mobile, Dojo, Ionic and so on...
The important thing to remember is to never navigate away from the index.html file because you will then "lose" the Worklight context and your application will then fail loading. The reason is because from the index.html file, you load various required Worklight-related files.
In this Worklight 6.2 project I demonstrate, using jQuery Mobile, how to navigate between pages. For your purpose, think of them as a mainpage that is a login page and then some other page that is the home page...
Related:
https://stackoverflow.com/a/25060136/1530814
https://stackoverflow.com/a/22171687/1530814

Making all Links in a Web View open in the Default Browser

I have a web view that displays a web page but I want all links on that page to open in the default browser. How would I do this?
Implement the WebPolicyDelegate so that any attempts to navigate are cancelled, and the URL opened in the default browser.