google+ pick wrong image in dialog when I share - javascript

I am trying to make a button share google+ with title, description and image. Everything works fine but only image that google+ pick wrong.
Here my code:
<meta property="og:type" content="website" />
<meta property="og:title" content="{title}" />
<meta property="og:image" content="{image}" />
After that I test and know that Google+ will pick image with largest size in your page.
Do you have any solution?

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 can i create Featured Image function in core php not in wordpress

There is a function for every page in wordpress so if we share link in other websites then it fetches title, description and featured image of that page / post, but i wanna make this functionality in core php not in wordpress, how can i make it so when i share link to other website then it fetches only that one featured image ? without featured image functionality it fetches only logo.
please could you help me?
If I understand correctly, all you need to do is add OpenGraph on your PHP/HTML header.
<meta property="og:title" content="Your desired title" />
<meta property="og:description" content="Some sentences here" />
<meta property="og:url" content="https://www.yourdomain.com/filename.php" />
<meta property="og:site_name" content="rumahweb.com" />
<meta property="og:image" content="https://www.yourdomain.com/featured-image.png" />
Insert above code (and adjust the value as necessary) inside your HEAD section of your HTML/PHP file.

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

Facebook still shows small thumbnail with og meta tags in place

I have a page on my website that is located at domain.com/mypage.html
I would like to do a link share with this link so that the ad is displayed but the whole image is still a link to our actual web page. The problem is that Facebook will still display the image in a small thumbnail like before they added the new larger link shares last year.
I have added all the og meta tags for the image, I have made sure the image has an aspect ratio of 1.91:1 with an actual size of 1200x627. The titles and description tags all have very little text so they are within the character limit.
I have refreshed the Facebook crawler's copy of the page with the Facebook Debugger/Linter tool.
Nothing I do changes how Facebook will display this link-share. It will never display in the larger format.
Here are meta-tags in mypage.html:
<meta property="og:image" content="http://www.domain.com/images/fb_ad.jpg"/>
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="627" />
<meta property="og:url" content="http://www.domain.com/mypage.html"/>
<meta property="og:title" content="My Title"/>
<meta property="og:description" content="My Description"/>

Categories

Resources