Sharesdk is powerful and detailed on its official website. Http://sharesdk.cn
Add the SDK to your project. The downloaded package contains detailed instructions. Third-party packages in China are still less than those made by foreigners. For exampleCodeThe architecture, detailed description of the document, and so on.
At least the instructions seem obscure. Unlike the pictures and texts made by foreigners, the step by step statements made by foreigners are very detailed and easy to understand. There is a small problem when using sharesdk 2.0.
Paste the code in specific situations
Nsstring * ImagePath = [[nsbundle mainbundle] pathforresource: @" Audio " Oftype: @" JPG " ]; // Construct shared content ID <Isscontent> publishcontent = [sharesdk content: Nil // @ "Share content" Defaultcontent: @" Shared content by default. displayed when no content exists " Image: [sharesdk imagewithpath: ImagePath] title: @" Sharesdk " URL: @" Http://www.sharesdk.cn " Description: @" This is a test message. " Mediatype: sspublishcontentmediatypenews]; [sharesdk show?actionsheet: Nil sharelist: Nil content: publishcontent statusbartips: Yes autexceptions: Nil limit options: nil result: ^ (Sharetype type, sspublishcontentstate state, ID <Issstatusinfo> statusinfo,ID <Icmerrorinfo> Error, bool end ){ If (State = Sspublishcontentstatesuccess) {nslog ( @" Shared successfully " );} Else If (State = Sspublishcontentstatefail) {nslog ( @" Failed to share, error code: % d, error Description: % @ " , [Error errorcode], [error errordescription]) ;}}];
This code snippet will be reported when ImagePath is nil"Failed to share,Error Code20007,Error description:Make sure to useMultpartUploaded image"
Error
Because when ImagePath is nil
[Sharesdk imagewithpath: ImagePath] The returned value is incorrect. If you do not share the image, set this parameter to nil.
This problem has already been reported to the Technical Support Team, and the Technical Support Team of sharesdk is still relatively fast.
In addition, if you only want to use anything, add anything to avoid your app being too bloated. I consulted sharesdk technical support and replied as follows:
1: You can delete the framework under the connection directory in the SDK.
2: the framework and bundle that cannot be used in the UI directory can also be deleted.
3: If you do not need to share it with QQ friends, you can remove the extend.