The Friends of iOS development share the use of 1. Preparatory work
(1) Register your friend's account and get Appkey
(2) Download the share library as needed (note: preferably 64-bit)
2. Basic sharing
(1) library file dragged into the project umeng_ios_social_sdk_4.2
(2) Add necessary binary libraries
If your project is set up all_load, you need to add the system framework required by your mobile QQ SDK:
Security.framework,
Libiconv.dylib,
Systemconfiguration.framework,
Coregraphics.framework,
Libsqlite3.dylib,
Coretelephony.framework,
Libstdc++.dylib,
Libz.dylib
(3) Appdelegate initialization Library
// APPDELEGATE.M Add header file #import " UMSocial.h " // Note: Support Sina Weibo, support SMS and email, do not support sharing [Umsocialdata Setappkey:@ "507fcab25270157b37000010"];
(4) Share
//Share page Add header file#import "UMSocial.h"//share the Code//Note: Share to friends, Friends Circle, collection, QQ space, QQ friends, friends, friends Circle, easy friends, easy friends Circle, Facebook, Twitter, Instagram and other platforms need to refer to their respective integration methodsNSString *text = [NSString stringWithFormat:@"recently there is an application%@ pretty good oh, friends come and play with me, the address is%@", Self.model.name,self.model.itunesurl]; //use Umsharetowechatsession,umsharetowechattimeline,umsharetowechatfavorite to represent friends, friends, Favorites[[Umsocialdataservice Defaultdataservice] postsnswithtypes:@[
Umsharetosina
] Content:text image:_iconimageview.image location:nil urlresource:nil presentedcontroller:self completion:^ ( Umsocialresponseentity *response) { if (response.responsecode = = umsresponsecodesuccess) { NSLog (@ " share success!) "); } }];
3. Add other required shares
To add a share, please see the Friend League share related documents
The use of the Friends League share of iOS development