Simplified compression and use examples of SHARESDK

Source: Internet
Author: User

The Share SDK was so big that it started simplifying, removing the ipad's picture and framework, compressing the pictures in the SHARESDK, and replacing several 200-K pictures with a few K images.

Just retained QQ Weibo, Sina Weibo, friends Circle, friends sharing, QQ space 5 basic sharing platform

Changes the size after compression. All the pictures have been compressed.

The original size.


Using the SHARESDK sharing process

+ (void) Sharetitle: (NSString *) title content: (NSString *) content Image: (UIImage *) img{//shared bottom Viewcontrooler Id<is        scontainer> container = [SHARESDK container];            Ability to set SHARESDK pop-up bottom viewcontroller//[container setiphonecontainerwithviewcontroller:nil];                                                         Own initiative to authorize id<issauthoptions> authoptions = [Sharesdk authoptionswithautoauth:yes Allowcallback:no Authviewstyle:ssauthviewst                                               Ylemodal Viewdelegate:nil        Authmanagerviewdelegate:nil]; On the Licensing page, join the attention official Weibo [authoptions Setfollowaccounts:@{share_type_number (Sharetypesinaweibo): [SHARESDK        Userfieldwithtype:ssuserfieldtypename valeu:@ "hahaha ah ha ha haha _ er"]}; List to share nsarray *sharelist = [Sharesdk Getsharelistwithtype:sharetypesinaweibo, Sharetypetencentweibo, Sharetypeqqspace,sharetypeweiXisession,sharetypeweixitimeline,nil];                                                              Share interface options id<issshareoptions> shareoptions = [Sharesdk defaultshareoptionswithtitle:title                                                               Onekeysharelist:sharelist                                                       Qqbuttonhidden:yes Wxsessionbuttonhidden:no Wxtimelinebuttonhidden:no Showk                                                          Eyboardonappear:yes Shareviewdelegate:nil Friendsviewdelegate:nil Picview        Erviewdelegate:nil];    Join the shared picture id<isscattachment> shareimage = nil;    Sspublishcontentmediatype sharetype = Sspublishcontentmediatypetext; if (img) {shareimage = [sharesdk pngimagewithimage:imG];    Sharetype = Sspublishcontentmediatypenews; }//share content id<isscontent>publishcontent=[sharesdk content:content defaultcontent:@ "" Image:shareImage title:tit        Le url:@ "http://www.sharesdk.cn/" description:@ "Mediatype:sharetype";                           Pop-up sharing menu [SHARESDK showshareactionsheet:container sharelist:sharelist                      Content:publishcontent Statusbartips:yes authoptions:authoptions Shareoptions:shareoptions result:^ (sharetype type, sspublishcontentstate state, Id<is Sstatusinfo> StatusInfo, id<icmerrorinfo> error, BOOL end) {if (state = = Sspublis                                hcontentstatesuccess) {NSLog (@ "sharing success");                                } else if (state = = Sspublishcontentstatefail)       {                             NSLog (@ "Share failed, error code:%d, description of error:%@", [Error ErrorCode], [error errordescription]);    }                            }]; }

Uploading resources is a bit slow.

http://download.csdn.net/detail/li6185377/5422381



Simplified compression and use examples of SHARESDK

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.