IOS SHARESDK Use

Source: Internet
Author: User

Flow Wizard software, also used in most places SHARESDK this three-party open Source Library. There are two kinds of requirements specifically

A. Pop up all sharing modules

b, only pop up the specified platform: such as Friends Circle and QQ.

Configuration method, the three-way library is also very detailed, here I only write out their own code implementation of the part

Here just write your own implementation of the share button click on the pop-up part of the code bar:

-(void) Share

{

NSString *imagepath = [[NSBundle mainbundle] pathforresource:@ "" oftype:@ "PNG"];

You need to get the URL address here

Structuring shared Content

id<isscontent> publishcontent = [sharesdk content:@ "Traffic wizard: Http://www.mopote.com/lljl/m?from=ios"

defaultcontent:@, "Write down your speech."

IMAGE:[SHARESDK Imagewithpath:imagepath]

title:@ "Fast Flow wizard to manage your traffic!" "//here in the circle of friends will show

url:@ "Http://www.mopote.com/lljl/m?from=ios"

description:@ "Fast Flow wizard to manage your traffic!" "

Mediatype:sspublishcontentmediatypenews];

Customize the platform you need to display (this requirement is important ....) In this case, I only configured a circle of friends

Nsarray *sharelist= [Sharesdk getsharelistwithtype:sharetypeweixitimeline, Nil];

[Sharesdk Showshareactionsheet:nil

Sharelist:sharelist//This is set to nil when all platforms are displayed

Content:publishcontent

Statusbartips:no

Authoptions:nil

Shareoptions:nil

result:^ (sharetype type, ssresponsestate state, id<issplatformshareinfo> StatusInfo, id<icmerrorinfo> Error, BOOL end) {

if (state = = ssresponsestatesuccess)

{

NSLog (@ "sharing success");

}

else if (state = = Ssresponsestatefail)

{

NSLog (@ "Share failed, error code:%LD, error description:%@", (long) [Error ErrorCode], [error errordescription]);

Uialertview *alertview=[[uialertview alloc]initwithtitle:@ "sharing failed" message:@ "app not Installed" Delegate:nil cancelButtonTitle:@ " Determine "otherbuttontitles:nil, nil";

[Alertview show];

}else if (State==ssresponsestatebegan)

{

}

}];

}

In fact, although the test is sometimes very annoying, but still very grateful for the test of persecution, but also let themselves to study .... Solve the problem is forced to ....

IOS SHARESDK Use

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.