Search code examples
apitwitterinfrastructure

How to let other APIs talk with yours which in return talks to Twitter?


Best title I could come up with, but to clarify, this is the situation:

I am working on a short url-like service which lets users 'log in' with their Twitter account and post stuff. Now this service could be included in applications such as Tweetdeck and the like.

My question is.. how would I make such a connection? What would be the flow to let another app know some sort of token that can be used with my Twitter-app?


Solution

  • Have you looked into Twitter's OAuth Echo implementation? Quoting:

    There are four parties involved in this interaction:

    • the User who is using Twitter through a particular, authorized Twitter application
    • the Consumer, or the Twitter application that is attempting to interact with the 3rd party media provider (e.g. the photo sharing site)
    • the Delegator, or the 3rd party media provider; and
    • the Service Provider a.k.a. Twitter itself.

    In your case, your service is the Delegator. More info on the documentation.