Open Auth Auxiliary Library (login with Imitatelogin implementation)

Source: Internet
Author: User

More and more companies on the network have their own platform strategy, the vast majority of which have the Web API to provide services externally, in order to facilitate the use of these services, you have to refer to a number of related libraries, but the nature of the API is actually just a few contractual network requests, Most of us use only a few of the features provided by the API, so I slightly modified the C # class library Under Weibo, joined the Imitatelogin library to simulate logins, and formed the Open-auth-assist Library.

The purpose of Open-auth-assist is to replace the existing API's class library with a common one, without adding too much extra work. Also this project can be counted as one of my other Open source project Imitatelogin demo.

The vast majority of the code for this class library originates from the project WEIBOSDK, because the author is not ready to update, and does not continue to provide the function of the simulation login, so I took over to modify the next open source (has been approved by the original author), currently only completed the microblog part of the implementation, Since this project relies on Imitatelogin, only imitatelogin completed sites will add support, Imitatelogin itself is not too technical, just need to be familiar with network requests and some patience to solve various client encryption, so if you have time , but also hope to be able to contribute some code for this project, thank you!

Below is a brief introduction to how to use Open-auth-assist to implement the call of the microblog API.

First, we need to instantiate a class of openauthassist:

var New Sinaweiboclient ("1402038860""62e1ddd4f6bc33077c796d5129047ca2  "http://qcyn.sina.com.cn");

The Appkey used in the example uses the key from the original author's example.

Next we log in to the user who needs to be manipulated:

Openauth.dologin ("username""password");

We then use the API provided by Weibo to get the user timeline to show how to use Get:

varresult = Openauth.httpget ("Statuses/friends_timeline.json",Newdictionary<string,Object>            {                {"Count",5},                {"page",1},                {"Base_app",0}            });

We send a microblog to show the invocation of the Post method:

var result2 = Openauth.httppost ("statuses/update.json"new Dictionary <stringobject>            {                "status"  String. Format ("post from openauth.assist! @{0:hh:mm:ss}", DateTime.Now)}            );

Next, enjoy it!


Without authorization, reject any full text and summary reprint!

Open Auth Auxiliary Library (login with Imitatelogin implementation)

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.