I already have the social-share button for whatsapp on my webpage, but when you choose a contact to send, it only writes "title_content url" on the writing box. It seams that whatsapp doesn't see the meta tags of the webpage to create a nice box with the image, title and description.
I am using the following open-Graph meta tags and it is working fine with facebook social sharing:
<meta property="og:type" content="website" />
<meta property="og:title" content="{{event.name}}" />
<meta property="og:description" content="{{eventDescription event.information}}" />
<meta property="og:url" content="{{eventUrl url}}" />
<meta property="og:image" content="{{eventImage event}}" />
<meta property="og:image:width" content="500" />
<meta property="og:image:height" content="500" />
<meta property="fb:app_id" content="#####" />
I do not have a icon for my event, so I can't set up the tag:
<link rel="shortcut icon" href="###.ico" type="image/x-icon">
I tried to set it with a .png image but it didn't work. So, what else can I do to whatsapp see my website and render that box with the image, title and description?
I just found out what was happening. When you try to feed information to facebook or twitter crawlers you need a special way to do it. So you have to create a crawler route with filter and dynamic content (as you can see on this tutorial that i created: Tutorial ).
With whatsapp you don't need to worry about server side rendering. When I created my open-graph meta tags direct on the <head>.
Eddited:
Because I need meta tags that work dynamically, I had to stop using direct on the <head>. But the docHead() or any of the packages were not working for me. So I realised that whatsapp can work from server side and use the same og: tags that I already have for facebook.
I just needed to find its user-agent that is WhatsApp/2.17.107 A and add the permition like I did for the other ones on the server side route.
Related
I am adding open graph and twitter meta tags to my site. At first I did this:
<meta property="og:image" content="${pdict.category.image.absURL}" />
<meta name="twitter:image" content="${pdict.category.image.absURL}" />
Then I tried consolidating the tags to this:
<meta property="og:image" name="twitter:image" content="${pdict.category.image.absURL}" />
Twitter had no warnings, FB told me I was missing the og:image property, however it still previewed as I would expect in both. Is there any reason why I should not do this?
So,
I use Advanced Custom Fields on Wordpress to set an featured image that i host on flickr, this way i can query it perfectly in the template i am building.
But this image isn't in the content(text) of the post, so for example Facebook or Twitter or any social media to share posts to don't see this image.
So in posts wherefore i only have one image. Which i show on top of the post as background for the title won't be shown inside the content and therefore social media don't recognize it.
Bullet points:
Wordpress Advanced Custom Fields plugin to add a field to a post where in i paste the url of the picture on flickr.
I can perfectly query the URL and implement it in the template i am building.
But this means that this picture isn't in the post content(text). Therefore social media don't seem to see this picture and don't show a picture if users want to share a article from my website.
I really don't know how to solve this and i hope that somebody has a solution.
English isn't my first language so excuse me in case of any spelling or grammar errors.
I don't really get why you want to host your featured image outside WP or, more specifically, on Flickr... but if you can get its URL via ACF (I guess you're using an URL field) and the issue is Facebook or Twitter doesn't retrieve your image when you share your page, maybe you should implement Open Graph and Twitter Card meta tags.
That's, in your header.php inside <head>:
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="#youraccount" />
<meta name="twitter:creator" content="#youraccount" />
<meta property="og:title" content="The title" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://www.example.com/your-page" />
<meta property="og:image" content="http://www.example.com/your-flickr-image-url" />
<meta property="og:description" content="Content description..." />
<script type='text/javascript' src='http://test.groundguitar.com/wp- includes/js/jquery/jquery.js?ver=1.10.2'></script>
<script type='text/javascript' src='http://test.groundguitar.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.2.1'></script>
<style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>
<meta property="og:type" content="article" />
<meta property="og:url" content="" />
<meta property="og:title" content="" />
<meta property="og:site_name" content="" />
<meta property="og:locale" content="en_US" />
<meta property="og:description" content="" />
<meta property="og:image" content="" />
</head>
These are lines added by wp_head();. For some reason it adds og tags, and I can't figure out why.
I'm using the Yoast SEO plugin, but have previously used All In One SEO, and they both had og tags disabled, yet this still appeared in the header. Rest of the plugins I'm using are: Facebook Comments by Fat Panda, Contact Form 7 and Any Mobile Theme Switcher. Disabling any of them didn't remove the tags.
Could this be a leftover from a plugin used in the past, which didn't uninstall correctly, and how can I remove it, or at least find out what's causing it?
That definitely looks like something a plugin would add.
First thing I would do is check the header.php file of your theme just to make sure they are not hard coded in there, never hurts to eliminate the obvious first.
Next, do you have JetPack enabled? If so do you have it's Social Links module enabled? Those og tags might be generated from there.
Last but not least if they still are showing up you will need to turn of EVERY plugin and check, might be something that another, not so obvious plugin might be doing.
Good luck!
Yoast plugin provides Opengraph for Facebook and Twitter so that if someone shares your post/page, the desired image with custom title can forward to those social media. You can check https: //www.facebook.com/kumarsn11/posts/747660215383716 this link which redirects user to your website. Its always helpful. Read some basic info about opengraph, you will get basic idea what you are actually using. Read This https: //blog.kissmetrics.com/open-graph-meta-tags/
You can disable it by SEO-> Social-> Add Opengraph Metadata. Disable This.
but I will recommend you not to disable, but use it properly with more customization.
When you click this social icon, you can use custom title other than original or keep the same for Facebook and Twitter.
It appears that Facebook and LinkedIn have differing standards for the og:image.
On Facebook they advise that the image should be at least 200 x 200 pixels (square) see here
However LinkedIn advise 180 x 110 pixels (rectangular) see here
Is there a way to target an og:image to either Facebook or LinkedIn seperately? What's the best way of doing this?
I'm trying to create a default thumbnail for the website home page which will let users share the home page in a nice manner. At the moment LinkedIn is cropping my og:image though Facebook and Google+ are sharing it nicely.
This ought to do it.
<meta property="og:image" content="image-180x110.jpg" /> <!-- 180x110 Image for Linkedin -->
<meta property="og:image:width" content="180" />
<meta property="og:image:height" content="110" />
<meta property="og:image" content="image-200x200.jpg" /> <!-- 200x200 Image for Facebook -->
<meta property="og:image:width" content="200" />
<meta property="og:image:height" content="200" />
Depending on the server environment something like this may work.
<meta property="og:image" content="<?php echo(strpos($_SERVER['HTTP_USER_AGENT'],'LinkedInBot') !== false ? 'image-180x110.jpg' : 'image-200x200.jpg'); ?>" />
This is a weird problem, never faced before & hope I'll never face it again. Our website worldocricket.com is running on wordpress. Its related to news website so we are using social plugins like facebook's like & twitter's tweet buttons etc..
We created some new pages on our site, they are outside of the wordpress folder but on the same domain & are are connected with wordpress using [wp-load.php]. They all are working fine but when we tried to create facebook like button for one of our new pages; using fb developers tool (like button creator) www.developers.facebook.com/docs/reference/plugins/like/ , it spoiled our lunch.
On adding page url " wwww.worldocricket.com/categories/special/tournaments/asia-cup/2012/accasia312.php " in 'URL to Like' box, it showed like counts in preview, on clicking 'like' & 'send' buttons, it revealed that it is liking/sending the main url of the site ( www.worldocricket.com ) which we don't want to, the url we added (or we want to be shared) was different. I thought that was a temporary problem but even after 24-36 hrs we got the same results.
We added og:title / og:type / og:url / og:image in the header after googling.
<meta property=”og:title” content=”ACC Asia Cup 2012”/>
<meta property="og:url" content="http://worldocricket.com/categories/special/tournaments/asia-cup/2012/accasia312.php" />
<meta property=”og:site_name” content=”World Of Cricket”/>
<meta property="og:image" content="http://worldocricket.com/categories/special/tournaments/asia-cup/2012/temptaby/images/asiacup12logo.jpg"/>
But it also proved to be useless. We then used fb debugger ( www.developers.facebook.com/tools/debug ), it showed that it is fetching right url but there is wrong Canonical URL. So we used <link rel="canonical" href="http://worldocricket.com/categories/special/tournaments/asia-cup/2012/accasia312.php"> but the result was same. :/
Our website : http://worldocricket.com
We want like button on http://worldocricket.com/categories/special/tournaments/asia-cup/2012/accasia312.php
Question is : How to get facebook social plugins (like , share , send) working correctly on our site's respective page?
According to the debugger, when the crawler reaches http://worldocricket.com/categories/special/tournaments/asia-cup/2012/accasia312.php it's finding multiple og:url tags, I've verified this in curl:
<meta property="og:title" content="ACC Asia Cup 2012"/>
<meta property="og:site_name" content="World Of Cricket"/>
<meta property="og:url" content="http://worldocricket.com/categories/special/tournaments/asia-cup/2012/accasia312.php" />
<meta property="og:image" content="http://worldocricket.com/categories/special/tournaments/asia-cup/2012/temptaby/images/asiacup12logo.jpg"/>
<meta itemprop="name" content="ACC Asia Cup 2012">
<meta itemprop="description" content="Best Cricketing event in Asia organized by Asian Cricket Council (ACC).">
<meta itemprop="image" content="http://worldocricket.com/categories/special/tournaments/asia-cup/2012/temptaby/images/asiacup12logo.jpg">
<meta name="generator" content="WordPress 3.3.1" />
<meta property="og:title" content=""/>
<meta property="og:type" content="article"/>
<meta property="og:url" content=""/>
<meta property="og:image" content=""/>
<meta property="og:site_name" content="World Of Cricket"/>
<meta property="fb:admins" content="1789905767"/>
<meta property='og:site_name' content='World Of Cricket' />
<meta property='fb:app_id' content='189072694472072' />
<meta property='og:locale' content='en_US' />
Make sure you're only returning one set of tags and they're valid