It's my first time to try adsense in a site I made from scratch
I tried to add adsense to my website over 10 times and everytime it says:
We found that your site is down or unavailable:
And the code provided is already in the <head></head> section of the website
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-2733350805802981",
enable_page_level_ads: true
});
</script>
website : https://www.a3traf.com
Related
I am trying to build a widget that other websites can include via an iframe. The plugin contains the Facebook Checkbox Plugin.
Consider the following code for the iframe:
<!DOCTYPE html>
<html>
<head>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '3297885870227646',
autoLogAppEvents : true,
xfbml : true,
version : 'v4.0'
});
};
</script>
<script async crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js"></script>
<body>
<div class="fb-messenger-checkbox"
origin="https://fb-marketing-widget.herokuapp.com/widget-iframe"
page_id="110054573751247"
messenger_app_id="3297885870227646"
user_ref="<%= userRef %>"
allow_login="true"
size="standard"
skin="light"
center_align="true">
</div>
</body>
</html>
The above code works when opening the iframe URL directly in the browser. However, when I include the same iframe in another website with a different domain, I'm getting Refused to display 'https://www.facebook.com/v4.0/plugins/messenger_checkbox.php?... in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors https://my-iframe-domain.com".
Please note that the iframe works when being opened directly, so this is clearly not a problem with whitelisting the domain, having the wrong app id etc.
Any input on how I can the above code as an iframe to be included in other websites would be greatly appreciated!
Facebook restricts which sites are able to frame their content, the error you see comes from your site not being allowed to frame the content from Facebook. Implementation step 1 (https://developers.facebook.com/docs/messenger-platform/discovery/checkbox-plugin/) for Facebook Checkbox plugin is to whitelist your domain(s): https://developers.facebook.com/docs/messenger-platform/reference/messenger-profile-api/domain-whitelisting. This is not something you can change on your page.
When I load <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>, images on my page get replaced with spam ads of all kinds.
I'm testing bare bones in a guest instance of chrome on my pc.
This is the original code:
<html>
<head>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
</head>
<body>
<img src="/images/ads/mm-mug-wide.jpg" />
</body>
</html>
These are screen shots of the network log with and without the adsense javascript. By the time I killed it, the network log with adsense showed 455 requests over 35 minutes.
With Adsense Javascript: https://18103791804392046531.googlegroups.com/attach/1841b7c6b6b0b5/adsense-network-log-with-adsense.jpg?part=0.3&view=1&vt=ANaJVrFCJMUV-pol5F7XFKcts8bc50qnvFbazg6PVlZXCOCj7PSJXGBJQkoZaU9AzQcs7xh0VS03Q8-pCS9c9iErGlhHCP3mkSWUMeMumfeQPkKkWpanUDU
Without Adsense Javascript: https://18103791804392046531.googlegroups.com/attach/1841b7c6b6b0b5/adsense-network-log-without-adsense.jpg?part=0.2&view=1&vt=ANaJVrHGcOCztReWJmK09Yr0YpkouhCZwxFzmmjfRfk2wyB0Rr9vb30Hl7SkanKF06LcCCxDvElQx4tB_ZQYRxB-96zOY8gXEp_IjL6q6pOzlsSuA4-nQZ8
UPDATE:
It only seems to do it if the word 'ad' or 'ads' ('header' was not a match) appear in the src. If the class is 'ad', it starts loading the spam resources but does not replace the image or continue on indefinitely.
The DNS on my router had been altered to point to a malicious DNS that was rerouting things such as google adsense.
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-6483687610557857",
enable_page_level_ads: true
});
</script>
i have google adsense Account which is activated already.
Now, i am going to place an AD on my blog and i added code into my blog but don't know why i am not able to see that AD on my blog
please help me out !!
Here is My Ad Code :
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-9307704483757505"
data-ad-slot="2264250676"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Thanks
I'm trying to get the registration flow for Facebook login working. Here's a bare-bones example:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<title>My Facebook Login Page</title>
</head>
<body>
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>
<div id="fb-root"></div>
<script type="text/javascript">
FB.init({
appId:'xxxxxxxxxxx',
cookie:true,
status:true,
xfbml:true,
channelUrl : 'http://<myWebSite>/channel.html',
oauth:true
});
</script>
<fb:login-button registration-url="http://<myWebSite>/register"/>
</body>
</html>
(The only things I've replaced above are the website and the appID)
If I try it like this, the login button shows up, but clicking it causes FireBug to report 'Unknown status: undefined' in the browser log. If I remove the 'oauth=true' line though, it works. I'm trying to adhere to the new oauth 2.0 standard, so I'd like to leave it in. Has anyone else run into this? Seems like if this was a bug, it would have been caught pretty early on.
the 'registration-url' parameter is no longer supported by , take a look in the documentation of it. http://developers.facebook.com/docs/reference/plugins/login/
Just check if the user is logged in via the JS-SDK
I am developing a facebook application using IFrame. how to add share option in my application.
You need to use XFBML in an Iframe application.
This should work. Put your Facebook application's API Key in and reference your cross-domain receiver file (xd_receiver)
<fb:share-button href="http://apps.facebook.com/your_app" type="box_count"></fb:share-button>
<script src="http://static.ak.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
<script type="text/javascript">
FB_RequireFeatures(["XFBML"], function() {
FB.init("api key goes here", "path to your xd_receiver file goes here");
});
</script>