I am trying to add a gif to my blogger post and want to share the animated gif to Facebook with an external link. the problem I am facing that the blogger is generating a custom thumbnail for og:image property. instead, I want to use a CDN link of gif which should be shared on Facebook.
Here is my post: I want to use this url instead of the auto generated thumbnail.
<img src ="https://thumbs.gfycat.com/QualifiedHilariousBufflehead-size_restricted.gif">
Here is my header code
<meta content="https://gifs.blogspot.com" name="og:site_name " />
<meta expr:content="data:view.title.escaped" property="og:title" />
<meta expr:content="data:view.description.escaped" property="og:description" />
<b:if cond="data:view.featuredImage">
<meta
expr:content='resizeImage(data:view.featuredImage, 1200, "1200:630")'
property="og:image"
/>
<b:elseif cond="data:widgets" />
<b:loop
reverse="true"
values="data:widgets.Blog.first.posts where (p => p.featuredImage) map (p => p.featuredImage)"
var="imageUrl"
>
<meta
expr:content='resizeImage(data:imageUrl, 1200, "1200:630")'
property="og:image"
/>
</b:loop>
<b:elseif cond="data:blog.postImageUrl" />
<meta
expr:content='resizeImage(data:blog.postImageUrl, 1200, "1200:630")'
property="og:image"
/>
</b:if>
<meta
content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1"
name="viewport"
/>
<title><data:view.title.escaped/></title>
<b:include data="blog" name="all-head-content" />
Try to delete the resize operator
<b:if cond="data:view.featuredImage">
<meta
expr:content='data:view.featuredImage'
property="og:image"
/>
<b:elseif cond="data:widgets" />
<b:loop
reverse="true"
values="data:widgets.Blog.first.posts where (p => p.featuredImage) map (p => p.featuredImage)"
var="imageUrl"
>
<meta
expr:content='data:imageUrl'
property="og:image"
/>
</b:loop>
<b:elseif cond="data:blog.postImageUrl" />
<meta
expr:content='data:blog.postImageUrl'
property="og:image"
/>
</b:if>
I think it can not be done using blogger.
As I see to share a playable GIF on facebook from a link you shared the open graph tags should be like this:
og:image: The link to GIF file
og:url: The same link from og:image
so in blogger you can't do it, unless i guess id you store all the GIF images in a subdomain with the same domain of your blog
Related
Linkedin - og:image tag not working
URL: https://toicartoons.timesgroup.com/cartoon/sandeep-adhwaryu/line-of-no-control/economy/1660326882851
<meta property="og:site_name" content="Times Of India"/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="https://toicartoons.timesgroup.com/cartoon/sandeep-adhwaryu/line-of-no-control/economy/1660326882851"/>
<meta property="og:title" content="Check out this cartoon! Enjoy a collection of more Line of No Control cartoons from TOI’s archives #TOICartoons #TOIEpaperPlus"/>
<meta property="og:description" content="Check out this cartoon! Enjoy a collection of more Line of No Control cartoons from TOI’s archives #TOICartoons #TOIEpaperPlus"/>
<meta name="author" content="Times Of India"/>
<meta name="image" property="og:image" content="https://imagerz.timesgroup.com/image-resizer/TimesCartoons/?s3_path=TimesCartoons/posts/1660326882851/assets/featureImages/1660326965939-Economy-2018-01-30.jpg&w=1200&h=630&fit=contain&q=75"/>
<meta prefix="og: http://ogp.me/ns#" property="og:image" content="https://imagerz.timesgroup.com/image-resizer/TimesCartoons/?s3_path=TimesCartoons/posts/1660326882851/assets/featureImages/1660326965939-Economy-2018-01-30.jpg&w=1200&fit=contain&q=75"/>
Blog Page: Basically the datas are API fetched. And I want the share button such that when users click on share button they are able to see the IMAGE, TITLE and DESCRIPTION
The share dialog I get
The share dialog I needed, but with the contents from my site
Facebook Debugger Result
A sneek peek into inspect element
return (
<>
<Head>
<title>{`Rangehaat: ${news.title}`}</title>
<meta
property="og:title"
content={news.title}
></meta>
<meta name="description" content={news.description} />
{/* FACEBOOK META SHARE */}
<meta property="og:url" content={compressedURL} />
<meta property="og:type" content="website" />
<meta property="og:description" content={news.description} />
<meta property="og:image" content={news.image.url} />
<meta property="fb:app_id" content="***********" /> //hidden part
</Head>
<section>
// Single Blog UI was here
<ShareIt
url={compressedURL}
title={news.title}
description={news.description}
/>
</section>
</>
);
Share Button Page:
import { FacebookShareButton, FacebookIcon } from "next-share";
export default function ShareIt(params) {
console.log(params);
return (
<>
<div>
<FacebookShareButton
// url={params.url}
url="https://www.facebook.com/dialog/share?app_id=145634995501895&display=popup&href=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2F&redirect_uri=https%3A%2F%2Fdevelopers.facebook.com%2Ftools%2Fexplorer"
title={params.title}
quote={params.description}
hashtag={"#RangehaatShare"}
>
<FacebookIcon size={32} round />
</FacebookShareButton>
</div>
</>
);
}
I'm trying to show the metadata that yoast shows without using the get_header (); or wp_head(). For example:
<meta property="og:locale" content="es_ES" />
<meta property="og:type" content="article" />
<meta property="og:title" content="Imagen : infografía.........." />
<meta property="og:description" content="infografía....." />
<meta property="og:url" content="https://....." />
Tried this but it doesn't work for me:
<? php echo get_post_meta ($ post-> ID, '_yoast_wpseo_metadesc', true); ?>
check this folder : wordpress-seo\src\presenters\open-graph
you can see locale-presenter.php
find this code line : (should be line 18)
protected $tag_format = '<meta property="og:locale" content="%s" />';
change like this (I edited as English , you can edit which language you need.)
protected $tag_format = '<meta property="og:locale" content="en_US" />';
I'm using the following command on a site I'm building on my local machine:
wget --page-requisites --html-extension --convert-links --restrict-file-names=windows --no-parent http://daosawan.dev
I'm using MAMP Pro to serve the pages locally. The URL http://daosawan.dev points to a directory on my local machine: /Applications/MAMP/htdocs/daosawan/
Here's the header of the resulting /index.html file:
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, user-scalable=no">
<title>Daosawan</title>
<link rel="stylesheet" type="text/css" media="all" href="wp-content/themes/daosawan_theme/style.css" />
<link rel='stylesheet' id='q-a-plus-css' href='wp-content/plugins/q-and-a/css/q-a-plus.css#ver=1.0.6.2.css' type='text/css' media='screen' />
<script type='text/javascript' src='http://daosawan.dev/wp-includes/js/jquery/jquery.js?ver=1.10.2'></script>
<script type='text/javascript' src='http://daosawan.dev/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.2.1'></script>
<script type='text/javascript' src='wp-content/themes/daosawan_theme/js/daosawan.js#ver=3.8.1'></script>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://daosawan.dev/xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://daosawan.dev/wp-includes/wlwmanifest.xml" />
<meta name="generator" content="WordPress 3.8.1" />
<!-- Q & A -->
<noscript><link rel="stylesheet" type="text/css" href="wp-content/plugins/q-and-a/css/q-a-plus-noscript.css#ver=1.0.6.2.css" /></noscript><!-- Q & A -->
<meta http-equiv="Content-Language" content="en-US" />
<style type="text/css" media="screen">
.qtrans_flag span { display:none }
.qtrans_flag { height:12px; width:18px; display:block }
.qtrans_flag_and_text { padding-left:20px }
.qtrans_flag_en { background:url(wp-content/plugins/qtranslate/flags/gb.png) no-repeat }
.qtrans_flag_fr { background:url(wp-content/plugins/qtranslate/flags/fr.png) no-repeat }
</style>
<link hreflang="fr" href="http://daosawan.dev/fr/" rel="alternate" />
</head>
Notice how some of the <link> and <script> tags are converted to relative, but some keep the http://, and breaks when I try to publish the saved website/page to a public location.
What am I doing wrong?
It appears that certain absolute URLs cannot be converted by wget. In my case, Wordpress rewrites certain URLs, which seems to confuse wget and show up as absolute URLs (http://...) in the output.
As a hacky work-around, I used Wordpress filters to make the app refer to relative URLs, and these are handled as expected by wget.
It's easy. You should use robots=off params.
How can I add an image to the title of a web application (something like facebook logo in head title)
<head id="Head1" runat="server">
<asp:ContentPlaceHolder ID="Head_Title" runat="server">
</asp:ContentPlaceHolder>
</head>
============================================================================
<%# Control Language="C#" AutoEventWireup="true" CodeFile="Head_Title.ascx.cs" Inherits="Controls_Head_Title" %>
<title>
website
||
<%= title %>
</title>
how can I add it ?
<head>
<link rel="shortcut icon" type="image/ico" href="/favicon.ico" />
<link rel="icon" type="image/ico" href="/favicon.ico" />
<link rel="apple-touch-icon" type="image/ico" href="/favicon.ico" />
</head>
Create your image as an ICO or PNG (16x16) and put it in your root folder.
You should have an icon and link it as below
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
Convert The Image Into 16X16 pixels (Image which you want See As tittle Image).
Only .ico Image will work as a tittle image so convert your image into .ico . For converting visit
http://www.favicon.cc/ and import you image and download Fevicon
place the image in root folder of your project Ex- /images/Logo.ico
use
<link rel="shortcut icon" href="/images/Logo.ico"
type="image/x-icon" />
tag in head section of your asp.net page.
Your Done...!!!