Access to social networking web sites via OAuth, part 3rd

Source: Internet
Author: User
Tags oauth

Deploy a Web Twitter client to Google App Engine

OAuth provides a better way for consumers to access protected resources at the service provider's site. By using OAuth, user credentials will never be exposed to sites other than where the user data was originally saved. By using the desktop Twitter client developed in part 1th, you can update your twitter status after authorizing myttdesktopclient access to your Twitter data. For the returned user, this is a good user experience because Access tokens can be reused. Part 2nd shows how to use OAuth to develop a WEB Twitter client that enables users to authenticate to Twitter and update their status through OAuth. It also shows the timetable of our friends.

In this article, you will learn how to make your WEB application work in a production environment. You will migrate the Twitter clients developed in part 2nd to the Google App Engine (GAE). You cannot simply deploy the WAR file; you need to make some modifications to make it work under GAE. The easiest way to handle gae is to use Google Plugin for Eclipse, which supports Gae and Google Web Toolkit (GWT) development.

Google App Engine

GAE is provided by Google to enable Web applications to run on Google's infrastructure. One of the big advantages of GAE is that your application can easily expand as traffic and data storage requirements grow. You can focus on software development without having to worry about Web and database server maintenance. When you deploy to the application on GAE, you can use it for free when the traffic is moderate. When more and more users are attracted to your site, you can buy more CPU time and data storage from Google. At the time of writing this article, GAE can support both Python and Java™ code.

Sign up for your WEB application on Google

All GAE applications need to be registered on Google.

If there is no Google account, then please register one.

Visit Google App Engine and log in.

Click Create an application. You will be prompted to enter the country and mobile phone number.

Google will send a CAPTCHA to your phone.

Once authenticated, you can log on to GAE and click Create an application to create a WEB application.

For example, I provided the following information when I registered my application:

Application identifier:dr-yang-tt.appspot.com

Select your own unique identifier.

Application Title:dr Yang ' s Twitter Client

Authentication options: Click the Edit link, select restricted to the following Google Apps domain, and then leave the dialog box blank.

By default, sites are exposed to all Google account users, but these settings enable everyone to access your site (users with Google accounts and non-Google users).

Sign up for your WEB application on Twitter

If you've read the first two articles in this series, you can register for a new application or modify a registered application in Twitter. As shown below, the sample application is registered as a new application, located in Http://twitter.com/oauth_clients.

Application Name:dr Yang ' Tt Web Client

Description: A Twitter Web client running inside the Google application engine

Application Web site:http://dr-yang-tt.appspot.com/twitterwebclient

Application Type:browser

Callback url:http://dr-yang-tt.appspot.com/twitterwebclient

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.