Cat Learning iOS third-party login Friends League implementation

Source: Internet
Author: User

One: Integration of Friends of the League to share

Do a third-party login now most of the Friends of the Alliance, do third-party login when the first download the SDK, and then read the document yourself, in fact, the official documents of the Friends of the Union has been very clear, here to write their own, do a note

II: Details

Friends League: http://www.umeng.com/

Write in Appdelegate

//设置分享到QQ/Qzone的应用Id,和分享url 链接    #import "UMSocialQQHandler.h"    [UMSocialQQHandler setQQWithAppId:@"100424468" appKey:@"c7394704798a158208a74ab60104f0ba" url:@"http://www.umeng.com/social"];

QQ Sign-in place

Umsocialsnsplatform *snsplatform = [Umsocialsnsplatformmanager getsocialplatformwithname:umsharetoqq]; Snsplatform. Loginclickhandler( Self, [Umsocialcontrollerservice Defaultcontrollerservice],YES, ^ (umsocialresponseentity *response) {//Get Weibo user name, UID, token, etc.            if(Response. Responsecode= = umsresponsecodesuccess) {umsocialaccountentity *snsaccount = [[Umsocialaccountmanager socialAccountDict Ionary] VALUEFORKEY:UMSHARETOQQ];//qq Nickname, uid, token, avatar image URL                NSLog(@"username is%@, UID was%@, token is%@ URL is%@", Snsaccount. UserName, Snsaccount. Usid, Snsaccount. Accesstoken, Snsaccount. IconURL); }});

This section of Snsaccount.username,snsaccount.usid,snsaccount.accesstoken,snsaccount.iconurl, respectively, represents the QQ nickname, UID, token, avatar image URL

Cat Learning iOS third-party login Friends League 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.