• For some reason Facebook is not taking the data that is inside open garph meta tags, I have no idea why. I’ve tried searching for a solution, tried removing plugins etc but nothing has helped.

    My site: https://ecomparo.lt

    The Opengraph code:

    <!-- This site is optimized with the Yoast WordPress SEO plugin v1.2.8.7 - https://yoast.com/wordpress/seo/ -->
    <title>eComparo.lt | Palyginkite greit?sias paskolas ir pasirinkite geriausi?</title>
    
    <link rel="stylesheet" href="https://ecomparo.lt/wp-content/plugins/sitepress-multilingual-cms/res/css/language-selector.css?v=2.6.0" type="text/css" media="all" />
    <meta name="description" content="eComparo.lt lygina Lietuvos greit?j? kredit? bendrovi? pasiūlymus, kad Jūs gal?tum?te pasiskolinti geriausiomis s?lygomis."/>
    <link rel="canonical" href="https://ecomparo.lt/" />
    <meta name="twitter:card" content="summary">
    <meta name="twitter:site" content="@eComparoLT">
    <meta name='twitter:image' content='https://ecomparo.lt/ecomparo-lt-logo.png'>
    <meta name="twitter:description" content="eComparo.lt lygina Lietuvos greit?j? kredit? bendrovi? pasiūlymus, kad Jūs gal?tum?te pasiskolinti geriausiomis s?lygomis.">
    <meta property='og:locale' content='lt_LT'/>
    <meta property='og:title' content='eComparo.lt | Palyginkite greit?sias paskolas ir pasirinkite geriausi?'/>
    <meta property='og:description' content='eComparo.lt lygina Lietuvos greit?j? kredit? bendrovi? pasiūlymus, kad Jūs gal?tum?te pasiskolinti geriausiomis s?lygomis.'/>
    <meta property='og:url' content='https://ecomparo.lt/'/>
    <meta property='og:site_name' content='eComparo.lt'/>
    <meta property='og:type' content='article'/>
    <meta property='og:image' content='https://ecomparo.lt/ecomparo-lt-logo.png'/>
    <meta property='og:image' content='https://ecomparo.lt/ecomparo-lt-logo.png'/>
    <!-- / Yoast WordPress SEO plugin. -->


    When posting URL to Facebook:
    https://i.imm.io/K7sJ.png

    Please help!

Viewing 15 replies - 1 through 15 (of 17 total)
  • I have the same problem, yoast is puting a ‘ into the meta property i.e

    <meta property=’og:url’ content=’https://www.cocoonfxmedia.co.uk/Blog/’/&gt;

    Should be :
    <meta property=”og:url” content=”https://www.cocoonfxmedia.co.uk/Blog/”&gt;

    Also it defaults to us_EN as well when we
    <meta property=’og:locale’ content=’en_US’/>

    This should then give you the correct location.
    <meta property=”og:locale” content=”en_GB”>

    Please advise ASAP how to fix the Open Graph issue.

    Go to the plugin folder for Yoast SEO (called wordpress-seo)

    Open the frontend directory, and you will find the file called “class-opengraph”

    You can modify the php code where instead of a single quote ( ‘ ), you can use a double quote through escaping mechanism. Here is an example:

    /**
    	 * Display an OpenGraph image tag
    	 *
    	 * @param string $img Source URL to the image
    	 *
    	 * @return bool
    	 */
    	private function image_output( $img ) {
    		if ( empty( $img ) )
    			return false;
    
    		$img = trim( apply_filters( 'wpseo_opengraph_image', $img ) );
    		if ( !empty( $img ) ) {
    			if ( strpos( $img, 'http' ) !== 0 ) {
    				if ( $img[0] != '/' )
    					return false;
    
    				// If it's a relative URL, it's relative to the domain, not necessarily to the WordPress install, we
    				// want to preserve domain name and URL scheme (http / https) though.
    				$parsed_url = parse_url( home_url() );
    				$img        = $parsed_url['scheme'] . '://' . $parsed_url['host'] . $img;
    			}
    
    			if ( in_array( $img, $this->shown_images ) )
    				return false;
    
    			array_push( $this->shown_images, $img );
    
    			echo "<meta property=\"og:image\" content=\"" . esc_url( $img ) . "\"/>\n";
    			return true;
    		}
    
    	}

    I am having this same problem. No matter what I try – I can’t get a title, image or description passed to Facebook even though the Open Graph information is there.

    This is what my header info looks like using Yoast SEO:

    <meta name="twitter:card" content="summary"/>
    <meta name="twitter:site" content="@https://twitter.com/1houseofpeace"/>
    <meta name='twitter:image' content='https://i1.wp.com/onehouseofpeace.org/wp-content/uploads/2013/04/Tender-Holding.jpg?fit=300%2C300'/>
    <meta name="twitter:description" content="In allowing ourselves to fully experience pain, in being with it with presence and compassion, we embrace the lessons we are here to learn. We grow."/>
    <meta property='og:locale' content='en_US'/>
    <meta property='fb:admins' content='1637053757'/>
    <meta property='og:title' content='Tender Holding -- the Grace of Being with Pain | One House of Peace'/>
    <meta property='og:description' content='In allowing ourselves to fully experience pain, in being with it with presence and compassion, we embrace the lessons we are here to learn. We grow.'/>
    <meta property='og:url' content='https://onehouseofpeace.org/tender-holding-the-grace-of-being-with-pain/'/>
    <meta property='og:site_name' content='One House of Peace'/>
    <meta property='og:type' content='article'/>
    <meta property='og:image' content='https://i1.wp.com/onehouseofpeace.org/wp-content/uploads/2013/04/Tender-Holding.jpg?fit=300%2C300'/>
    <meta property='og:image' content='https://onehouseofpeace.org/wp-content/uploads/2013/04/Tender-Holding-1024x1024.jpg'/>
    <!-- / Yoast WordPress SEO plugin. -->

    I am using Jetpack as my social share plugin and am using the code from Yoast’s website to disable the OG tags from Jetpack.

    I have deactivated all the other plugins besides Jetpack and Yoast SEO and it still didn’t work.

    What am I missing?

    This is what it looks like when I try to share to FB: https://www.dropbox.com/s/4rujjd5q23uslnq/fb_screen_shot.tiff

    I just fixed this for myself. I found the solution in another post.

    I simply had to remove the trailing slash after my custom permalink and it works perfectly now.

    Witch triling slash ?? give us some more info.

    I wen’t to: Settings > Permalinks

    I had custom permalinks set and it looked like this: example.com/%postname%/

    I changed it to this: example.com/%postname%

    By deleting the trailing slash. That’s it.

    I went to: Setting > Permalinks

    I had custom permalinks set and it looked like this: example.com/%postname%/

    I deleted the trailing slash so now it looks like this: example.com/%postname%

    That’s it.

    I went to Setting > Permalinks

    I had a custom permalink set and it looked like this: example.com/%postname%/
    I changed it to: example.com/%postname%

    by deleting the trailing slash at the end. That’s it.

    It’s not working for me :(( I changed the permalinks and nothing changes when i try to post an article into facebook. my web is predlagamfilm.hol.es
    take a look pls.

    Tnx !

    Can you confirm that you actually have the Open Graph settings set up correctly within Yoast SEO?

    Also, I am using Jetpack Share so I also had to add a function to my functions file that disables Jetpacks Open Graph Tags (just google: disable jetpack open graph).

    If you’re using some other share plugin than there may be another conflict.

    I gonna explain you my case.

    Everything was working OK before i update the plugin.

    I try a couple of things.

    Changing the template – not work
    Reinstalling the plugin with the defaut config – not work
    Disable all plugins leaving only SEO by Yoast – not work

    Yes, i’ve got Open Graph checked in the configuration in within the plugin.

    Best regards.

    In that case I would revert back to the old plug-in version and start a new thread.
    That seems specifically related to the latest update release.

    Do you know how to downgrade the version of the SEO plugin ?

    Well, you should have backed up the site before doing an update and then you would have access to the old plug-in files and be able to copy the old files into the plug-in folder via FTP. If you DIDN’T do that…than I don’t know how to help you.

    I should do it next time when i make any update ?? lol

    Thank you very much for your help !!!

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘[Plugin: SEO by Yoast] Open Graph not working with Facebook’ is closed to new replies.