Share an image on Facebook and redirect to Fan Page - html

I am trying to share an image on Facebook via Email Marketing but I am having trouble to redirect after the share.
The code I insert in the email is:
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>My Title</title>
</head>
<body bgcolor='#eaeaea' style='font-family:Verdana'>
<div>
<a href='http://www.facebook.com/dialog/share?app_id=MY_APP_ID&href=URL_IMAGE&redirect_uri=https://www.facebook.com/FAN_PAGE&display=page'><div>Please share this image with your friends on Facebook:</div><BR><div><IMG SRC='URL_IMAGE'></a>
</div>
</body>
</html>
I get the error that I can't redirect to that URL.
I have configured in the APP the url of the website where is stored the image, but I am not able to redirect to the fan page on facebook.

I assume it is this error:
Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings.
It seems that you canĀ“t redirect directly to a facebook.com URL, you have to redirect to your own external website instead - and you have to add that URL/domain in your App settings. You could just implement a simple redirection from your external website to the fan page, as a workaround.

Related

HTML mobile redirection - avoid opening in the app

I have a website redirecting traffic to Kayak.com, lately I noticed users that have the Kayak app installed (iOS / Android) on their device, are being redirected to the app, instead of remaining in the browser.
Sometimes the users would get a question "Open in the kayak app?", while for others it will immediately open the Kayak app.
I wanted to ask how to disable this behavior?
I want all users to remain within the browser, just open the URL in the browser without opening the app (similar behavior to Desktop).
The HTML redirection code:
<!DOCTYPE html>
<html>
<head>
<h1> HTML redirection - how to avoid opening on the app / offering "open in the app?" </h1>
</head>
<body>
<meta http-equiv="Refresh" content="1;url=https://www.kayak.com" />
</body>
</html>
I don't have control of app installations or Kayak's website behavior.
I have tried replacing the HTML redirection with PHP redirection,
And tried JS redirection as well.
Both approaches result in the same outcome (opens in the app / offers to open the app).
For convenient testings I added this code to a web page :
http://www.hotels-bargains.com/htmlredirection.php
Any idea on how to keep the users inside the browser?

How to 301 redirect a static url to another static url?

My website is HTML/CSS/JS website with no server (static website) sitting on MS Azure.
I have recently changed 2 of the html files like this:
www.mydomain.com/oldfile1.html
www.mydomain.com/oldfile2.html
To
www.mydomain.com/newfile1.html
www.mydomain.com/newfile2.html
how can I redirect the old url for the sake of SEO, considering the webiste is static and .htaccess doesn't work and it seems the using meta tag in html file is not considered as 301 permanent redirection?!
A 301 Redirect is a server side directive.
Anything you place in a client side file (<meta> / javascript) cannot be read by the browser until the files arrive in the browser.
At this point it's too late to execute a server side directive.
You're now pointing the browser at the destination you're trying to point it away from.
Probably not the best answer, but you could change the the html of oldfiles to redirect to the newfiles.
So something like this:
<html>
<head>
<!--Tells search engines to not index this page-->
<meta name="robots" content="noindex">
<!--Redirect to new resource-->
<meta http-equiv="Refresh" content="0; url=www.mydomain.com/newfile1.html">
</head>
<body>
<!--In case both JavaScript and the meta tag fail-->
<p>If you aren't automatically redirected please followthis link.</p>
<script>
//JavaScript fallback if browser does not support/allow http-equiv="Refresh"
window.location = 'www.mydomain.com/newfile1.html'
</script>
</body>
</html>

onenote snapshot intranet webpage

Is it possible to take a webpage snapshot of a non-public facing website (intranet) using the OneNote API?
I'm using the OneNote API to create OneNote notebooks, pages and sections. It's working well. Unfortunately, when I use data-render-src and point it to an intranet website, it fails to take a snapshot. The application is on the same intranet as the website I wish to capture.
Example HTML:
<!DOCTYPE html>
<html>
<head>
<title>A page with an image: Webpage capture zzzz</title>
<meta name="created" value="2015-11-11T12:45:00.000-8:00"/>
</head>
<body>
<p>This page displays an image of the webpage.</p>
<img data-render-src="https://intranet.website.com" width="800"/>
</body>
</html>
Note: I can take snapshots of publicly accessible websites.
Webpage snapshot description
https://learn.microsoft.com/en-us/graph/onenote-images-files#add-a-webpage-snapshot
Image rendered from html description
https://learn.microsoft.com/en-us/graph/onenote-images-files#add-an-image-rendered-from-html
I don't think it is - the OneNote aPI server will not have access to that page because it isn't public. You'll have to extract the HTML and send it over through the API instead of using data-render-src.

Website fails to load, but on refresh loads?

So my domain is pointed at a redirect file which in turn loads the first page in a website.
It has worked in the past. The host recently switched servers though and said it would be seamless. Now when you navigate to www.AiySlumlords.com it hits the redirect then fails to load the second page. HOWEVER, if you hit refresh after it fails then it loads?
I have no clue why this isn't working. Here is the redirect file
<html>
<head>
<title>A web page that points a browser to a different page after 2 seconds</title>
<meta http-equiv="refresh" content="0; URL=./Home/f1.html">
<meta name="keywords" content="automatic redirection">
</head>
<body>
<p>If your browser doesn't automatically go there within a few seconds, you may want to go to the destination manually.</p>
</body>
</html>
Since your server is powered by IIS and ASP.NET, it's better to use ASP.NET to redirect your client, e.g. create an index.aspx page with the following content:
<%
Response.Redirect("~/Home/f1.html", false);
Response.StatusCode = (int)System.Net.HttpStatusCode.MovedPermanently;
Response.End();
%>

html: how to redirect traffic to a different web address?

html: how to automatically redirect traffic from my webspace to a different web address using HTML?
I am new to this. I and am just trying to redirect traffic from my webspace to a Facebook page. iTunes does not allow my Facebook page address to be placed there due to it's length. So I need a relay buffer. If there is an easier way of doing this let me know.
Thanks
You can use a meta refresh tag:
<meta http-equiv="refresh" content="0;url=http://facebook.com/" />
Well you can use a meta refresh element:
<meta http-equiv="refresh" content="0;url=http://www.facebook.com/<url>">
Or a javascript redirect:
<script type="text/javascript">window.location = "http://www.facebook.com/<url>"</script>
Or a HTACCESS redirect:
Redirect / http://www.facebook.com/<url>
Or use an iframe.
But personally, I'd use the short facebook URL, something like http://www.facebook.com/cnn. This should be short enough for iTunes.