No embeds API access - iframely - javascript

I am working on a project, and a key point of it, is to display links as embeded content. After looking around I found iframely.
One of their methods is to use embed.js, like this:
iframely.load(containerElement, 'http://yoururl.here');
or like this:
<a href="http://yoururl.here" data-iframely-url>yoururl.here</a>
Doing both like this, I get a "Preview not available. No embeds API Access" error.
Here is a jsfiddle of the code

You will need an iframely API-Key.
See API Documentation
Get an API-Key here

Related

Google Model Viewer AR

we are trying to make a custom 3D configurator with AR capabilities, but we found out that model-viewer from google is too limited for our needs, so we are doing it in three.js
To use the AR we analyzed the source code and found out that there is a redirect to this link when clicking the model-viewer button:
intent://googlewebcomponents.github.io/model-viewer/examples/assets/Astronaut.glb?link=https%3A%2F%2Fgooglewebcomponents.github.io%2Fmodel-viewer%2Fexamples%2Faugmented-reality.html&title=A%203D%20model%20of%20an%20astronaut
(taken from the Google's example page)
Out first tests made a warning in the console like "Inaccessible Navigation" silently failing.
Do you have an idea on what are we doing wrong?
The link above was wrong. I inspected the source code and find out that the correct one is built like this:
intent://${modelUrl}?link=${link}&title=${title}#Intent;scheme=${scheme};package=com.google.ar.core;action=android.intent.action.VIEW;S.browser_fallback_url=${fallbackUrl};end;
Where:
modelUrl path to the glb file without http/https
link url of the page
title textual title of the model
scheme http / https
fallbackUrl the url to fallback if something goes wrong
This link works only for android phones with AR hardware.

Google Apps Script: Getting a URL parameter to use in Javascript

I have a web app with Google Apps Script and would like to take a URL parameter and use it in modifying my HTML via Javascript, but am finding this tricky.
If I try using window.location in my Javascript it gives a different URL than the one shown in the address bar. The URL shown in the address bar is like this ... https://script.google.com/macros/s/MY_SCRIPT_ID/exec?param1=value1 .... but window.location gives something like this https://SOME_SORT_OF_LONG_ID-script.googleusercontent.com/userCodeAppPanel (it doesn't have param1 / value1 at all).
I know how to get the parameter value when I'm in the doGet(e) function -- by using e.parameter.param1 -- but I don't know how to be able to then subsequently use that value in some Javascript.
Help, please!
The html that GAS provides is never the actual URL, it is essentially another ID that google uses to keep track of its web pages. Remember that all Google apps are running on the Google server.
This may not be the same with a standalone script, but I suspect it will be, but I know if you get a google doc, the actual URL is:
https://docs.google.com/document/d/{{{ Your Document ID }}}
I expect a standalone app will be similar. Try using your webapp.getId(), and then adding it to the actual url of your script.

Redirection url in Adobe Analytics

I have a simple html page in order to test locally the Adobe Analytics.
I try to implement analytics for url.
I have a simple url with onClick event like this:
Youtube
Using the official documentation at page 223 I found the following variables:
s.referrer="https://www.youtube.com/"
s.pageURL="https://www.youtube.com/"
I add them to my code but the problem persists again. What can I do in order to fix the server call problem?
Solved using this:
Youtube
If you set your s.linkInternalFilters correctly you shouldn't need to hard code an exit link for www.youtube.com.
The purpose of this configuration variable is to tell Adobe Analytics which link clicks will be considered internal to your site vs. external link clicks (exits) which take you away from your site (IE www.youtube.com).
If you're looking to count any click on a YT link as an exit you can set your s.linkInternalFilters like this:
// s_code or DTM JS config
s.linkInternalFilters ="my-local-URL,javascript:,mailto:,tel:"
YT link clicks (exits) will now be tracked automatically.

get Title from video with youtube api v3 with javascript

I'm trying to understand how the new data api from google works, more specifically the youtube (v3) one, but haven't been able to follow any of the google documentation successfully. If anybody could give me a quick example of how to get the title or any other metadata from a you tube video either using the video id or the video url, I will really appreciate it.
I have tried https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.videos.list but none of the requests seem to work for me.
Also tried following this https://developers.google.com/api-client-library/javascript/dev/dev_jscript
but as soon as I try gapi.client.setApiKey(YOUR API KEY); it starts giving me can't apply setApiKey to undefined etc etc
Thanks for your help in advance.
Register your app first and get a developer key, so you will your key there.

facebook comments - doesn't let me moderate

I'm trying to install facebook comments on my page, but it doesn't let me moderate. On a test page with only the comments plugin - no problem. the same code exactly on a live page - doesn't let me moderate.
the test page:
http://www.radicalislam.org/test3.html
the live page:
http://www.radicalislam.org/news/pakistan-hands-huge-prison-sentence-bin-laden-informant
tried to debug, it shows the right admin and app id.
it's a drupal site, if it's important
Looks like you are using partial URLs for the href. Use the full one.
Use the following instead.
<div class="fb-comments" href="http://www.radicalislam.org/news/pakistan-hands-huge-prison-sentence-bin-laden-informant" data-num-posts="5" data-width="580"></div>
Unfortunately my work Firewall wouldn't let me click through to the link.
Are you using the correct URL when you add the Facebook comments to the page? If you aren't you won't be able to moderate, you will likely need to dynamically add the URL to the generated code.
Have you tried scraping the page using the debug tool (as the admin)?
http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.radicalislam.org%2Ftest3.html
This will read the updated admin IDs and let the administrator see the moderation panel in the plugin and via https://developers.facebook.com/tools/comments

Categories