Lan Yi iOS Weibo project login

Source: Internet
Author: User

Login process:

The first login to enter the login page, according to the pretext of the network request, the return data there is code, intercept the return data to code, and then again access, request return Token,token is the last we want, the future of the microblogging and other operations to use token. The first time you log in, the next time you start the program click the login button will not be logged in, because the first time you log in to get tokens and plist file saved.

When the various initialization methods are executed:

1.init typically used for object initialization at the model level

2.initWithframe Pure Code Creation control

3.initWithCoder using child controls when creating controls with Xib or SB not created well

4.AWEAKFROMNIB create a control with Xib or SB by using child controls

5.initWithStyle Custom Tableviewcell is initialized by a pure code registration method.

Code that creates child controls in a custom control must be written in the initialization method

Dictionary Turn model

The dictionary contains: name: Zhang San, age=1

You can get a token after you have successfully landed on Weibo.

Token

1. Loading the landing page via WebView

2. After successful login, we will jump to the callback page we specified and append code to the callback page address to intercept and obtain code via the WebView protocol method.

3. Use code to send HTTP requests for final token

Lan Yi iOS Weibo project for login

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.