Twiproxy-Twitter API proxy Based on GTAP 0.4

Source: Internet
Author: User
Tags oauth

Twitter finally blocked basic auth. To avoid rejection of the token, a gtap 0.4 version was installed on Google appengine. It seems that twitterrifle is available, but Twitter's official client is not available yet.

Speaking of Twitter official, it is a very tangled piece.

When I first purchased a set of Tweetie, but soon Twitter was banned, and Tweetie did not support proxy. I heard that Tweetie 2 supports proxy, I found that I was unable to upgrade because I had to pay for the upgrade. Hey hey, I feel a bit fooled.

Later, Tweetie was acquired by Twitter and turned into an official, free client. I'm so happy to download it quickly. I found it was useless. I upgraded Tweetie 3 again, while Tweetie 3 only supports Xauth, for example, GTAP does not support oauth only.

No way. You can't be lazy. Just do it yourself.

Speaking of Xauth, it is actually a simple oauth mode. The biggest difference with basic auth is that it does not pass the user name and password, but the access_token and self-Signed data. The GTAP does not support this mode, this is because the oauth/access_token command is not supported.

Therefore, you have made several changes on the GTAP:

    • Add the oauth/access_token command and convert the user name/password sent from the client to access_token and access_token_secret.
    • When the client sends a request, it obtains access_token_secret through the access_token sent by the client. GTAP uses the user's password to encrypt the stored access_token and access_token_secret. As a result, it cannot directly obtain access_token_secret through access_token. This is a security mechanism, however, because the deployer can output the user name and password or token in log mode, it is changed to plaintext storage. There may be a better way. Here we should be a lazy one first. Generally, apps are deployed by ourselves.
    • With the addition of basic commands, the agent can fully support the original basic auth client, such as chrome's famous plug-in metrist, which can be implemented through basic, however, the current test results are strange, and the data has been returned normally. However, metrist can only be obtained occasionally and does not know why.

For ease of development, Google Code re-built a project twiproxy, using the same open-source protocol as GTAP. If you are interested, you can check it out. You are also welcome to provide suggestions for modification :)

The last line is the twiproxy function.

    • Supports the functionality of the original GTAP 0.4
    • Supports Xauth mode, that is, supports Twitter for iPhone Login
    • Support for the original basic auth client (unconfirmed)

Address:

    • Twitter.com: xxx.appspot.com/
    • Api.twitter.com: xxx.appspot.com/api
    • Basic Auth: xxx.appspot.com/basic

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.