Why the facebook iframe like button is not working ? - javascript

Although it works offline, it isn't working online..this is the code used
<iframe src="http://www.facebook.com/plugins/like.php?app_id=125925834166578&href=http%3A%2F%2Fwww.facebook.com%2FBaradei.Presidency&send=false&layout=button_count&width=450&show_faces=true&action=like&colorscheme=light&font&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe>
And this is the webpage in which the like button at the bottom of the page isn't working...Please help! http://www.ali_lsheikh.0fees.net/baradei.html

First thing I would try is to include all the necessary Open Graph tags. For example from my site Candy Japan:
<meta property="fb:admins" content="297200003"/>
<meta property="og:url" content="http://www.candyjapan.com"/>
<meta property="og:site_name" content="candyjapan"/>
<meta property="og:title" content="Candy Japan"/>
<meta property="og:type" content="website"/>
<meta property="og:image" content="http://www.candyjapan.com/static/logo.png"/>
Then also see that it passes the Facebook url linter. Currently it is reporting some error about your page I have never seen before "blocked or is being accessed too frequently, so we're not fetching it.". Perhaps it will start fetching again later, so I would try linting again after a while.

Related

Meta property sharing link on whatsapp is not working

Until today I did not know how to show an image when sharink a link on whatsapp.
I have this site:
https://vivepuravida.com/propiedad/casa-escazu-41-apartamento-115k/
You can check I have this on the head tag:
<meta property="og:url" content="https://vivepuravida.com/propiedad/casa-escazu-41-apartamento-115k/">
<meta property="og:type" content="website">
<meta property="og:title" content="Testing sharing">
<meta property="og:image" itemprop="image" content="https://image.wasi.co/eyJidWNrZXQiOiJzdGF0aWN3Iiwia2V5IjoiaW5tdWVibGVzXC9ncjgwMjkyMDIxMDEwNjExNDgxNS5qcGciLCJlZGl0cyI6eyJub3JtYWxpc2UiOnRydWUsInJvdGF0ZSI6MCwicmVzaXplIjp7IndpZHRoIjo5NzksImhlaWdodCI6NzQzLCJmaXQiOiJjb250YWluIiwiYmFja2dyb3VuZCI6eyJyIjoyNTUsImciOjI1NSwiYiI6MjU1LCJhbHBoYSI6MX19fX0=">
As you can see the og:image is set with another picture took from another site.
But when sharing my website on whatsapp, it only displays my website icon.
Can anyone help me?
Thanks!
Try resizing the image to 400×400 and convert to .png or .jpg formats.

How to access embedded openload iframe

I'm trying to get direct download links from embedded openload links (example: https://openload.co/embed/CoKeagPRpQg/). The result might look something like this: https://openload.co/stream/CoKeagPRpQg~1527355595~2a02:120b::~J-XBN0SR?mime=true. If you navigate to the embed link and run
document.querySelector("#mediaspace_wrapper > div:last-child > p:last-child")
from the developer console, the essential data for the stream link is returned. When I tried to implement this on an embedded video on my private site, I got an error for cross site scripting, which is understandable.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Proflix</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>
<body>
<iframe id="video" src="https://openload.co/embed/CoKeagPRpQg/" scrolling="no" frameborder="0" width="700" height="430" allowfullscreen="true"
webkitallowfullscreen="true" mozallowfullscreen="true">
</iframe>
</body>
</html>
However, I stumbled across this chrome extension, which with JavaScript alone can enter the iframe (Demo). This really puzzles me. I contacted the developer and he told me his extention was based on this script. But it didn't work from the developer console. My question is: How can JavaScript enter a foreign iframe in this example and how can I replicate it?
Related:
Get the unique download link on Openload
Get stream URL from openload

Twitter card not working even after validation

I want to add a Twitter button on my website to share content, as well as a Twitter card. I've already added the meta tags.
Here is the code for my share button:
Tweet
This is the code for the meta tags I've added as well:
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="#nytimes">
<meta name="twitter:creator" content="#SarahMaslinNir">
<meta name="twitter:title" content="When Great Minds Don’t Think Alike">
<meta name="twitter:description" content="How much does culture influence creative thinking?">
<meta name="twitter:image" content="http://176.32.230.11/trialandtest.com/assets/images/profile-img.jpg">
Here is the link to my site:
http://176.32.230.11/trialandtest.com/
I'd be grateful if someone could assist me as to where I am going wrong, because I have my URL whitelisted on Twitter, but when I try to share something it does not share the content on the preview window and shares the old one.
Your share url should be dynamic. I think when you click on the share button it is taking your static url ie. http://176.32.230.11/trialandtest.com

Open Graph for Facebook sharing picks wrong image

I am using Open Graph for image sharing but it picks up the wrong image that I’ve already deleted from the database. In the Inspect Element tab of Web Inspector, it shows the correct image path but it does not share the correct image.
PHP code:
<meta name="keywords" content="HTML, Meta Tags, Metadata" />
<meta name="description" content="Profile Share by user." />
<meta name="author" content="I" />
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="http://mydocs.com/">
<meta name="twitter:title" content="User profile">
<meta name="twitter:image" content="<?php echo $SITE_PATH.$meta_userimage;?>" />
<meta property="og:title"content="User profile" />
<meta property="og:image" content="<?php echo $SITE_PATH.$meta_userimage;>"/>
I’ve already referred to this link but it doesn’t help me.
When Facebook queries the open graph data for a page, it gets cached until you flush it or 24 hours are up.
If you visit this facebook debug page and try scraping the page; you will find an option to refresh the scrape by clicking the "Fetch new scrape information" button

Inject text dynamically to facebook's share dialog via content-script - javascript

my app is a chrome extension
I have a content-script injected to Facebook share pop-up.
I successfully manage to add text to the input via DOM manipulation,
but when I click share, it clears the input and then share the link.. any idea why?
Best practice for FB share is via Open Graph, http://ogp.me/
<!-- Facebook Open Graph Meta Tags -->
<meta property="og:title" content="OG title" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://domain.com" />
<meta property="og:image" content="http://domain.com/fb-image.png" />
<meta property="og:description" content="OG description" />
You can also try FB sharer, but keep in mind that it's deprecated and not advised to use.
fb share

Categories

Resources