So im trying to load a static google map img, but there is only the image icon showing. This is a given code from and examination so i can't find what seems to be the problem.
Here is the result:
And below is the code:
<html>
<head>
<title>Google Map karta LTU</title>
</head>
<body>
<img src="https://maps.google.com/maps/api/staticmap?center=65.61835,22.140&zoom=14&size=512x512&maptype=roadmap&markers=color:blue%7Clabel:L%7C65.61835,22.140&key=AIzaSyC7p1EldP9HoI1ziysd2BZ9vvqSNNt35Dk"
alt="Google Map"
style="width:505px" />
</body>
</html>
If you visit the site, you can see that the problem is written there:
The Google Maps API server rejected your request. This API project is not authorized to use this API. Please ensure this API is activated in the Google Developers Console: https://console.developers.google.com/apis/api/static_maps_backend?project=_
Activate your API and provide the key necessary for displaying static images.
Related
I'd like to integrate an auto-login pop-up as the one displayed in https://www.lequipe.fr
It detects your session in the browser and asks you if you want to join with your Google Account.
How can I implement this in my website? ( I already have Google Sign in ) - is using the GAPI API?
It's Google One-tap sign-up, it can be integrated using their API, follow this guide to setup Google One Tap in your website.
When you have added the Oauth2 ClientID in Google console. You would just use something like :
<!DOCTYPE html>
<html>
<head>
<script src="https://accounts.google.com/gsi/client" async defer></script>
</head>
<body>
<div id="g_id_onload"
data-client_id="XXXXXXXXXXXX-bk2lj5rs6l4c6g23nmtsfdh66qhfu921.apps.googleusercontent.com"
data-login_uri="https://localhost:3000/login"
>
</div>
</body>
</html>
and you would get :
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.
I have been following this codelab to fit my purpose of adding a Google App Script html service page to home-screen on a mobile device:
https://codelabs.developers.google.com/codelabs/add-to-home-screen/#1
However I am not creating a Web Server for Chrome, is it possible to achieve this with the html service?
At the moment of editing the manifesto and republishing as web app it reverts any changes done to it. I have attempted to host my json manifesto on external sites and DevTools still cannot detect it.
My index.html from App Script.
<!DOCTYPE html>
<html>
<head>
<base target="_top">
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<link rel="manifest" href="https://api.myjson.com/bins/1gst5h">
</head>
<body>
Some HTML..
</body>
</html>
My Google App Script Web App is fully functional and can be accessed through a the /exec link, I want to implement it to mobile home-screen but I don't know if the manifesto is truly being edited as upon publishing it reverts any changes done to it.
Google Apps Scripts are published in iframes. Where is your manifesto located? In the Play store or in the App Script? If it is in the Apps Script it it is likely the the manifesto doesn't make it to the client.
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.
I am trying to get all the notes on my website to get exported onto Google drive. I have a pop up window with a "Save to drive" button but I can't figure out what file this HTML needs to be converted to. Also not sure how to convert the HTML into the certain file that Google drive needs.
Based from this documentation, the button is configured with a few attributes in a div tag in the HTML markup. You need to include the necessary JavaScript resource below to add the Save to Drive button:
<!DOCTYPE html>
<html>
<head>
<title>Save to Drive Demo: Basic Page</title>
<link rel="canonical" href="http://www.example.com">
<script src="https://apis.google.com/js/platform.js" async defer></script>
</head>
<body>
<div class="g-savetodrive"
data-src="//example.com/path/to/myfile.pdf"
data-filename="My Statement.pdf"
data-sitename="My Company Name">
</div>
</body>
</html>
Check the examples here.