Fetionsdk basic code

Source: Internet
Author: User

// Reference fetionsdk. dll in the C # project
Add an assembly in the code

Using nullstudio. fetion_sdk;

 

// Instantiate an Apsara stack object

Fetionsdk SDK = new fetionsdk ();

 

// Add a response event

SDK. sdk_error + = new fetionsdk. sdk_erroreventhandler (sdk_sdk_error );

SDK. sdk_receivemessage + = new fetionsdk. sdk_receivemessageeventhandler (sdk_sdk_receivemessage );
SDK. sdk_usersatuschange + = new fetionsdk. sdk_usersatuschangedeventhandler (sdk_sdk_usersatuschange );

 

// Complete the code when the event occurs

Void sdk_sdk_error (Object sender, nullstudio. fetion_sdk.event.sdk_erroreventargs Fe)

{

// Todo

}

Void sdk_sdk_receivemessage (Object sender, nullstudio. fetion_sdk.event.sdk_receivemessageeventargs Fe)

{

// Todo

}

Void sdk_sdk_usersatuschange (Object sender, imps. Client. Core. usersatuschangedeventargs E)

{


// Todo

}

 

// Complete the Apsara stack logon code

SDK. accountmanager. filluseridandpassword (phonenum/* Mobile Phone Number */, password/* password */, true/* Whether to log on automatically */);
SDK. accountmanager. loginorlogout (); // automatically determines whether to log out or log on.

 

// Obtain the Apsara group list

List <imps. Client. Core. contactgroup> listgroup = SDK. contactcontrol. getcontactgroup ();

 

// Get a list of all Apsara friends

List <imps. Client. Core. Contact> listfriend = SDK. contactcontrol. getallcontactlist ();

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.