WordPress.org

Ready to get started?Download WordPress

Forums

Facebook Status - Email Updater
[resolved] accentuated titles rejected by fb? (2 posts)

  1. alm06130
    Member
    Posted 2 years ago #

    It seems that not properly encoded accentuated titles are rejected by facebook email updater.
    To make it work, I use headers and title conversion:

    function fbseu_email_facebook($post)  {
       $SECRET_EMAIL = get_option('fbseu_secret_email');
       $title = $post->post_title;
       $href = get_permalink($post->ID);
       $from=get_option('admin_email');
       $headers ='User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.7.12) Gecko/20050915'."\r\n"
                .'X-Accept-Language: fr, en'."\r\n"
                .'MIME-Version: 1.0'."\r\n"
                .'From: '.$from."\r\n"
                .'Content-Type: text/plain; charset=utf8; format=flowed'."\r\n"
                .'Content-Transfer-Encoding: 8bit'."\r\n";
       $title=mb_encode_mimeheader($title);
       $subject=$title.' '.$href;
       mail( $SECRET_EMAIL, $subject , '',$headers );
       return $post->ID;
    }

    http://wordpress.org/extend/plugins/facebook-status-email-updater/

  2. cjellison
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for the notice and the fix! I added it into version 1.2.

    I really appreciate your help.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic