//
//  ShareContentView.m
//  ALand
//
//  Created by Z on 16/4/27.
//  Copyright © 2016年 Z. All rights reserved.
//

#import "ShareContentView.h"
#import "UMSocial.h"
@implementation ShareContentView


//分享到微信朋友
- (IBAction)shareToWeiChatSession:(id)sender {
    self.clickBlock();
    [UMSocialData defaultData].extConfig.wechatSessionData.url = self.url;
    [UMSocialData defaultData].extConfig.wechatSessionData.title = self.title;
    [[UMSocialDataService defaultDataService]  postSNSWithTypes:@[UMShareToWechatSession] content:self.content image:self.image location:nil urlResource:nil presentedController:nil completion:^(UMSocialResponseEntity *response){
        if (response.responseCode == UMSResponseCodeSuccess) {
            NSLog(@"分享成功！");
        }
    }];

}

//分享到微信朋友圈
- (IBAction)shareWxTimeLine:(id)sender {
    self.clickBlock();
    [UMSocialData defaultData].extConfig.wechatTimelineData.url = self.url;
    [UMSocialData defaultData].extConfig.wechatTimelineData.title = self.content;
    [[UMSocialDataService defaultDataService]  postSNSWithTypes:@[UMShareToWechatTimeline] content:self.content image:self.image location:nil urlResource:nil presentedController:nil completion:^(UMSocialResponseEntity *response){
        if (response.responseCode == UMSResponseCodeSuccess) {
            NSLog(@"分享成功！");
        }
    }];
}
- (IBAction)shareToWeiChatTimeLine:(id)sender {
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
