Open Graph Facebook

  • Hi! I have an issue with the Open Graph style. I’ve personalized the title, image and description of the facebook details and set the twitter details to be borrowed from the facebook settings. The issue appears when I share the publication, because the twitter cards appeared with the configuration setted but the facebook not, it crawls the title and description by default (not the image). Doy you know what I could do to fix this? Thanks.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    Would you mind sharing a copy of the URL to one of the affected posts so that I can investigate this issue further?

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hi there,

    Thanks for the follow up.

    I have checked the page source on the attached page and the OpenGraph images are similar and work as expected as shown below:
    IMG

    I have also checked from the Facebook debugger and the right image is displayed as shown here:
    IMG

    I hope this info helps. Thank you.

    But the problem is that thats not the title and description I typed for the post! It crawls the main title (shown there) but not what I typed on the Rank Math social tab. Here it is what the post has to show:

    Hi there,

    Thanks for the response.

    The OG meta is held on the Facebook cache for sometime. I would suggest that you make use of the Facebook debugger to scrape the data until the URL is able to load the right data.
    IMG

    I hope this info helps. Thank you.

    Hi! Please check this link: https://ibb.co/bXdN3jf

    Is another post, but the same issue. The title I typed is there! But Facebook does not take it, it uses by default one. It tried 10 or 15 times with the debugger, but it stays the same.

    Hi Fede,

    Thanks for the follow up.

    I have gone through the page source and identified that there is another plugin that is loading OG meta data for your posts. Here is how the OG meta for Rank Math looks on the affected page:
    IMG

    And this is some additional tags loaded on the same page, these tags are the ones shared on the social media:
    IMG

    I would suggest that you perform the steps described on this page to be able to identify the plugin that is loading the additional tags: https://rankmath.com/kb/check-plugin-conflicts/

    I hope this info helps. Thank you.

    Hi! Thanks for your answer. I tried with that process and finally discovered that the theme is the problem. It inserts that “og” properties and I can’t find how to delete them. Could you please help me?

    Hi Fede,

    Thanks for the follow up.

    I can suggest that you comment out the following code in your theme’s functions.php via FTP, I could not make changes to the file:

    if ( ! function_exists( 'sun_add_og_meta' ) ) :
      function os_add_og_meta(){
        echo '<meta property="og:url"           content="'.esc_url(get_the_permalink()).'" />';
        echo '<meta property="og:type"          content="website" />';
        echo '<meta property="og:title"         content="'.esc_attr(get_the_title()).'" />';
        echo '<meta property="og:description"   content="'.esc_attr(get_bloginfo('description')).'" />';
        if(is_single()){
          echo '<meta property="og:image"         content="'.esc_url(wp_get_attachment_url( get_post_thumbnail_id() )).'" />';
        }
      }
    endif;
    
    add_action('wp_head', 'os_add_og_meta');

    I hope this info helps. Thank you.

    Thank you very much! Now Facebook is crawling correctly.

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/?rate=5#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

Viewing 11 replies - 1 through 11 (of 11 total)

The ticket ‘Open Graph Facebook’ is closed to new replies.