#import <Foundation/Foundation.h>@interface umsocialsinahandler : NSObject + (void)openssowithredirecturl:(NSString *) RedirectURL; @end
#import "AppDelegate.h"#import "UMSocial.h" #import "UMSocialSinaHandler.h"@interfaceappdelegate ()@end @implementation appdelegate -(BOOL) Application: (UIApplication *) application didfinishlaunchingwithoptions: (Nsdictionary *) launchoptions {//Override point for customization after application launch. // set up secret keys shared by Friends [Umsocialdata setappkey:@ "5458264dfd98c5b5c9007064" ]; // Open the Sina Weibo SSO switch and set the Sina Weibo callback address, which must match the callback address you set up in the background of Sina Weibo. If you set up our callback address in the background of Sina, "http://sns.whalecloud.com/sina2/callback", here can pass nil [ Umsocialsinahandler openssowithredirecturl:@ "http://sns.whalecloud.com/sina2/ Callback" ]; returnYES;}-(BOOL) Application: (UIApplication *) application Handleopenurl: (Nsurl *) url{return[Umsocialsnsservice Handleopenurl:url];}-(BOOL) Application: (UIApplication *) Application OpenURL: (Nsurl*) URL sourceapplication: (NSString*) sourceapplication annotation: (ID) annotation{return[Umsocialsnsservice Handleopenurl:url];}@end
#import "ViewController.h"#import "UMSocial.h"@interfaceViewcontroller ()@end @implementation viewcontroller - (void) Touchesbegan: (Nsset *) touches withevent: (Uievent *)Event{ //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 methods /*Sheetview: Which view you need to show AppKey: The current app's allies share key sharetext: Text to share shareimage: images to share Sharetosnsname S: the platform you need to share*/ /*[Umsocialsnsservice presentsnsiconsheetview:self appkey:@ "5458264dfd98c5b5 c9007064 "sharetext:@" the words you want to share "Shareimage:[uiimag E imagenamed:@ "Icon.png"] Sharetosnsnames:[nsarray Arraywithobjects:umsharetosina,umshareto Tencent,umsharetorenren, Umsharetodouban, Umsharetofacebook, Umsharetoflickr, Umsharetoinstagram, nil] Delegate:nil]; */[Umsocialsnsservice presentsnsiconsheetview:self AppKey:@"5458264dfd98c5b5c9007064"Sharetext:@"Friends Alliance social sharing allows you to quickly realize social functions such as sharing, Www.umeng.com/social"shareimage:[uiimage imagenamed:@"Icon.png"] Sharetosnsnames:@[umsharetosina]Delegate: self];}@end
IOS Integrated Friends League share