Coder Social home page Coder Social logo

Character encoding in status about tmhoauth HOT 5 CLOSED

timersys avatar timersys commented on July 29, 2024
Character encoding in status

from tmhoauth.

Comments (5)

themattharris avatar themattharris commented on July 29, 2024

interesting, i've tried this before with my library (without modification) and it submitted successfully. do you mind sharing the code snippet you are using to send those characters. i used:

$code = $tmhOAuth->request('POST', $tmhOAuth->url('1/statuses/update'), array(
  'status' => 'sending á é í ñ'
));

which worked without trouble. here's a snippet of the response:

"text":"sending \u00e1 \u00e9 \u00ed \u00f1""

from tmhoauth.

themattharris avatar themattharris commented on July 29, 2024

closing this one out. if my comment above didn't help please let reopen letting me know what isn't working.

from tmhoauth.

spuckylucky avatar spuckylucky commented on July 29, 2024

Hi, first of all thanks for the library and the example code wich is very handy. Everything works fine and it updates status smoothly, unless the status contains certains characters. The thing goes far beyond my understanding and i'd really appreciate any suggestion.
The characters are è and é and the error message is "could not authenticate with oauth" but sometimes is "invalid unicode character". I really don't understand what triggers the former and what the latter, but i'm sure that are those two characters.

from tmhoauth.

oosswwaalldd avatar oosswwaalldd commented on July 29, 2024

Hi!, I am having the same problem, the issue occurs when I get direct messages and then trying to post them, when there is a special character like described above, Twitter returns a 403 error, wrong credentials, but that does not happen.

Thanks a lot for taking the time to debug this.

from tmhoauth.

spuckylucky avatar spuckylucky commented on July 29, 2024

I feel so stupid but the problem was that the message has to be utf8 encoded, 'status' => utf8_encode($your_tweet). I hope this will solve your problem too.

from tmhoauth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.