What's wrong with this PHP Twitter API POST?

What is the basic logic behind how Twitter's @Anywhere API makes post/get requests?

  • I'm trying to wrap my head around how Twitter is able to make get and post requests with the @Anywhere api, using javascript onwly. Any insight is GREATLY appreciated!

  • Answer:

    Very similar to easyXDM[1], which is open-source so you can use it yourself.  There is an iframe hosted on http://api.twitter.com (with the associated ability to make XHR requests to that domain) that can communicate with the @anywhere JavaScript running in the main page, using `window.postMessage()` and related workarounds.  Very simple. Authentication is done using an early implementation of client-side OAuth 2. [1]: http://easyxdm.net/wp/

Ben Cherry at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.