- Well, Cakephp.
After downloading the TwitterComponent, place it app/Controller/Component/TwitterComponent.php.
Open the TwitterComponent.php file and replace:
and it should work. Don’t forget to place the app/Vendor/http_socket_oauth.php as well.
Quoting their official docs
To the human eye the length is clearly four characters. Depending on how the data is represented this could be either five or six UTF-8 bytes. Twitter does not want to penalize a user for the fact we use UTF-8 or for the fact that the API client in question used the longer representation. Therefore, Twitter does count “café” as four characters no matter which representation is sent.
The code to get a string’s length (like twitter) in php is to use the multi-byte strlen function
strlen would give the same result after using the decode function.