Why amp-ad not loading ads on the pages where content is not in english? - adsense

We have a bi-lingual website with amp implemented for the mobile site.
We are using amp-ad tag with type="doubleclick", the ads are rendering fine on english version of website where as for other language its showing empty slot.
Here is the code:
<amp-ad width="336" height="280" type="doubleclick"data-slot="/75242261/apherald-mobile-336x280">
<div placeholder></div>
</amp-ad>
Also the screenshots for the how it looks.
Ad on telugu page:

Related

Inserting Facebook plugin on mediawiki

I am trying to get the Facebook plugin working on my wiki. Using the guidelines provided by Facebook I copied the Java Script SDK in MediaWiki:Common.js, which should run it for all users.
Now I am trying to enter the simple HTML code also generated by Facebook :
<div id="Facebook" class="fb-page" data-href="(my FB page)" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true" data-show-posts="false"></div>
'My FB page' is of course replaced by the actual URL.
I tried two ways of entering the code.
Making a Template:Facebook page and linking to it like {{Facebook}} on the actual page
Even though this is not recommended forcing the html by adding the parameter $wgRawHtml = true; and entering the code in the ... tags.
None of this ways resulted in the Facebook plugin appearing on my wiki.

Mobile e-mail body : change links depending on client apps

Note : read both answers below, thery helped us.
Original question:
Want to show appropriate deep link : http://en.wikipedia.org/wiki/Mobile_deep_linking so if android and no our app installed : show android app link, else html page link
App sends email to users. Want to be able to change links depending on device. If desktop - as is. If mobile go thru mail body and add "m." to all the href OR other link if our native app installed.
Do mobile mail clients run js?
Do I need to encode the js in anyway. Tried google but not able to get the right keywords to search for. End up on page about send grid or using js to send an email.
I want js inside email body. I know can change template at server, but want it to be dynamic to current client. So same email opened on desktop -> desktop links ; inside mobile app or browser - mobile links.
Or other html solution would be cool. W3 are you listening?
You can show/hide links depending on device using media queries. Try this:
<style>
#media only screen and (max-device-width: 500px) {
a[class=mobileLink] {
display: inline !important;
font-size: 24px !important;
}
a[class=desktopLink] {
display: none !important;
}
}
</style>
<!-- Starting link switching technique -->
HTML page link
<a href="link/for/mobile/version" class="mobileLink" style="display:none;
font-size:0px">Mobile page link</a>
<!-- End link switching technique -->
Yes, Outlook ignores display:none but if the link is just text, font-size:0px should take care that.
Want to show appropriate deep link : http://en.wikipedia.org/wiki/Mobile_deep_linking so if android and no our app installed : show android app link, else html page link
This cannot be done in emails, but it can be done in landing pages, like the web version of your email.
App sends email to users. Want to be able to change links depending on device. If desktop - as is. If mobile go thru mail body and add "m." to all the href OR other link if our native app installed.
This can be done by using media queries to hide/show desktop or mobile content when appropriate. (Responsive emails.)
Do mobile mail clients run js?
No -- security issues.
Do I need to encode the js in anyway. Tried google but not able to get the right keywords to search for. End up on page about send grid or using js to send an email.
There's nothing you can do to get JS to work in email clients. It just won't work.
I want js inside email body. I know can change template at server, but want it to be dynamic to current client. So same email opened on desktop -> desktop links ; inside mobile app or browser - mobile links.
Once again, this can be done using media queries. (Responsive emails.) There are some drawbacks, but I suggest doing a Google search for "Responsive Emails" to get started.
Or other html solution would be cool. W3 are you listening?
There's nothing they can do in the email world. Unlike web browsers, where there are set standards, in the email world, anything goes.
Edit: Although using media queries to show the appropriate link/button for the devices, it's not a bulletproof solution. The best solution is to use your web server's power to determine where the user should go, depending on their user agent or viewport size.
There is a more modern solution, that is supported natively by mobile platforms.
On ios it's called universal links and on Android app links.

Facebook Register Plugin not showing up?

I am trying to implement Facebook Register Plugin on my website for landing pages.
I am following this guide:
https://developers.facebook.com/docs/plugins/registration/v2.0
I've written following code:
<div id="registration">
<iframe src="https://www.facebook.com/plugins/registration?client_id=660604224016242&redirect_uri=http://automaton.in/store_user_data.php?&fields=[{"name":"name"},{"name":"email"},{"name":"password"},{"name":"gender"},{"name":"birthday"}]">
</iframe>
</div>
But nothing is showing up instead of a box with border.
I've also created my facebook app with app-id 660604224016242.
Also, I am running my site locally without a local server! Do I need to run this on a server?
Please help me, I really need to implement this plugin!

Links in fb canvas apps not working in IE

I created a canvas facebook app. The app itself was made in html and consisted of multiple different pages, the first page linking to the next, and so on... (links were assembled as simple html a tags with target="_self")
Everything seemed to be working fine in FF, Safari, Chrome, but not when we were testing in IE. It seems that redirecting within an iframe works different in IE, and it showed in the url of the browser:
When testing in FF,..., the url of the startpage would be apps.facebook.com/our-namespace, and after linking to the next page, this url in the browser would always remain that same apps.facebook.com/our-namespace.
When testing in IE, the url of the startpage would also be apps.facebook.com/our-namespace, but as soon as you hit one of the links, the url in the browser would change to apps.facebook.com/our-namespage/the-page-we-re-linking-to.php, not taking the target="_self" into account. When clicking on a comparable link again, the app would redirect to the start screen...
I spent hours trying to find an answer, I saw that changin IE's security settings would make it work:
in IE: go to Tools --> Internet Options --> Security --> Internet Zone --> Custom Level --> Miscellaneous --> Launch programs and files in an IFRAME. and make sure it is set to enabled
But this is not an acceptable solution as IE is configure different by default.
I found the solution was (in php) to add the following line to your code:
<?
header("p3p: CP=\"ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV\"");
?>
Problem solved! This should be in the facebook developer docs!!

Facebook IFrame on page canvas?

Hey guys, I have developed a small site that i would like to embed into a tab on a facebook page.
Previously I used this code to load in an iframe, it worked great:
<a onClick="outside_location.setInnerFBML(link_1);" style="cursor: pointer;">Link 1</a> | <a class="red" onClick="outside_location.setInnerFBML(link_2);" style="cursor: pointer;">Link 2</a>
<div id="outside_location"></div>
<fb:js-string var="link_1"><fb:iframe width="760" height="1280" frameborder='0' src='http://www.WebWhispers.in' /></fb:js-string>
<fb:js-string var="link_2"><fb:iframe width="760" height="1280" frameborder='0' src='http://google.com/' /></fb:js-string>
<script type="text/javascript" charset="utf-8">
var outside_location = d
document.getElementById('outside_location');
</script>
However, it has stopped working. I dont think facebook allows iframe inside of pages, only applications.
How can I load this page in without learning FBML? The site uses Jquery so I cant use FBML anyway.
I know applications can use iFrames, can I make it an application and then embed the application into a page tab somehow?
No. Tab pages can not contain iFrames. They must be written using FBML and FBJS.
One reason for this is that Facebook does not want to enable Tab pages to detect who looks at them. All requests (including images) on tab pages are proxied through Facebook for this reason. If iframes were allowed then the application would be able to detect who looked at it, which would present a privacy issue for Facebook users.
This is either a policy change by Facebook or, more likely, a bug. I say it's unlikely to be a policy change as it throws a script error, whereas a policy change would more likely strip the code out before it's rendered.
There's a bug report you can add votes to and follow here.