Posting emoji to Twitter

Discussion in 'PHP' started by sarahk, May 27, 2018.

  1. #1
    I've got some code that is successfully posting to twitter but I'm missing something when posting emoji.

    Supposedly with php7 I should be able to use codes like this (BO) which comes out as plain text.

    "\u{1F1E7}\u{1F1F4}"
    Code (markup):
    Has anyone done this before and can point me in the right direction?
     
    sarahk, May 27, 2018 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,808
    Likes Received:
    4,534
    Best Answers:
    123
    Trophy Points:
    665
    #2
    that fried a few brain cells

    should be

    $letters['B'] = '1F1E7';
    $letter1 = html_entity_decode('&#x'.$letters['B'].';', 0, 'UTF-8');
    PHP:
     
    sarahk, May 27, 2018 IP