• Hi!

    I have a problem related to sharing a post from my blog to Facebook.

    My URL should look like this actually:
    spranceanaluidostoievski.ro

    The character with a breve is : a. But when I share a post I want the link displayed in Facebook to contain spranceanaluidostoievski.ro and not xn--sprnceanaluidostoievski-k6b.ro.
    How can I do that?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor socialtech

    (@socialtech)

    Thank you for reaching out!

    This is how Facebook deals with special characters in the domain name and we do not have any control over it. Copy-paste the link from your browser to Facebook and notice that the limitation comes from them (or see https://www.screencast.com/t/sMOjbRAzN4).

    Thread Starter zilchbjork

    (@zilchbjork)

    Hi!

    Thank you for your reply

    So I tried actually several methods with JavaScript, or with the Yoast SEO plugin ( and in functions.php by manipulating the og:url and nothing seemed to work).
    Something like this:
    function add_http_og_url_tag(){
    if( ! is_singular() ) return;
    global $post;
    $ogurl = get_permalink( $post->ID );
    $ogurl = esc_url( str_replace( ‘xn--sprnceanaluidostoievski-k6b’, ‘spranceanaluidostoievski’,$ogurl ) );
    echo “\n<meta property=’og:url’ content=’$ogurl’>\n”;
    }
    add_action(‘wp_head’, ‘add_http_og_url_tag’);

    So this type of encoding called Puny Code cannot be solved anyhow?

    Plugin Contributor socialtech

    (@socialtech)

    Please seek for advice at Facebook.com, as we previously said, our plugin is not the cause of the issue.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Facebook sharing URL not showing special characters ( diacritics, breve)’ is closed to new replies.