title: Emojis and Twitter api
body: <p>I use twitter api from php to generate tweets. Generate the message in this way:</p>
  
  <pre><code>$text = utf8_encode("message content");
  </code></pre>
  
  <p>I want to add an emoji (<a href="http://www.get-emoji.com/birthday-cake/" rel="nofollow noreferrer">http://www.get-emoji.com/birthday-cake/</a>)</p>
  
  <p>Try the following but it is wrong:</p>
  
  <pre><code>$text = utf8_encode("message ").html_entity_decode('&amp;#x1f382;', 0, 'UTF-8').utf8_encode(" content");
  </code></pre>
  
  <p>Show the resulting content in Twitter:</p>
  
  <p>"message ? content"</p>
  
  <p>How can it be solved?</p>