一個iOS的社交平臺分享管理器:ShareManager

jopen 9年前發布 | 21K 次閱讀 iOS開發 移動開發 ShareManager

一個iOS的SNS分享管理器:ShareManager。支持非死book, 推ter, QQ 和微信。支持單個和批量分享至社交平臺。

PreView

Drawing Drawing

How To Integrate to Your Project

  1. Install via cocoapods

    platform :ios, '7.0'
    
    target 'Your_Target' do
    
    pod 'ShareManager', :git => 'https://github.com/imjerrybao/ShareManager.git'
    
    end
  2. AppDelegate add below code

#import "ShareManager.h"

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.

    [self initSharePlatform];

    return YES;
}

- (void)initSharePlatform
{
# Replace the share platforms app key, secret and redirect uri to yours

    [[ShareManager sharedManager] initTencentQQWithAppKey:kQzoneKey appSecret:kQzoneSecret];
    [[ShareManager sharedManager] initWexinWithAppKey:kWeixinAppKey appSecret:kWeixinAppSecret];
    [[ShareManager sharedManager] initWeiboWithAppKey:kWeiboAppKey appSecret:kWeiboSecret redirectUri:kWeiboRedirectUri];
    [[ShareManager sharedManager] init推terWithAppKey:k推terAppKey appSecret:k推terAppSecret redirectUri:k推terRedirectUri];
    [[ShareManager sharedManager] init非死bookWithAppKey:k非死bookAppKey appSecret:k非死bookAppSecret redirectUri:k非死bookRedirectUri];
}

- (BOOL)application:(UIApplication *)application  handleOpenURL:(NSURL *)url
{
    return [[ShareManager sharedManager] handleOpenURL:url];
}

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
    return [[ShareManager sharedManager] handleOpenURL:url];
}

項目主頁:http://www.baiduhome.net/lib/view/home/1439299990489

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!