使用PHP将表情符号发布到Twitter

I have code to post to Twitter with PHP which works well using this guide

I am trying to attach Emojis to the posts, but have been unsuccessful so far.

I am wondering if anyone knows how, using the above guide, how I would go about being able to add emojis to each tweet generating the code via PHP.

Essentially I would need to put whatever code is needed into some kind of variable in PHP.

I needed to add utf8_bytes to the variable