shareSDK
来源:互联网 发布:自建机房与阿里云对比 编辑:程序博客网 时间:2024/09/21 09:02
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[ShareSDKregisterApp:@"iSDK"];
[selfinitializePlat];
}
-(void)initializePlat
{
[ShareSDKconnectTwitterWithConsumerKey:@"PMLaCYVRN8SdssgpHFRA"consumerSecret:@"1Ie8RO6RwD5n2F4zuiY0PGmUftrgxfgdY"redirectUri:@"http://iSDK.com/"];
[ShareSDKconnectFacebookWithAppKey:@"474077567543"
appSecret:@"64165e36696b1a924ddc445"];
}
//////////////////////////////////////////
-(void)twitterShareImage
{
id<ISSContent> publishContent = [ShareSDKcontent:self.show_img.photo_description
defaultContent:@"iSDK"
image:[ShareSDKimageWithPath:bimg.data_small_path]
title:@"iSDK"
url:@"http://www.iSDK.com"
description:@"iSDK"
mediaType:SSPublishContentMediaTypeNews];
[ShareSDK shareContent:publishContenttype:ShareTypeTwitter authOptions:nil shareOptions:nilstatusBarTips:YES result:^(ShareType type, SSPublishContentState state,id<ISSStatusInfo> statusInfo, id<ICMErrorInfo> error, BOOL end) {
if (state ==SSPublishContentStateSuccess)
{
NSLog(@"分享成功");
UIAlertView *alertView = [[UIAlertViewalloc]initWithTitle:nilmessage:NSLocalizedString(@"Share success",nil) delegate:selfcancelButtonTitle:@"OK"otherButtonTitles:nil,nil];
[alertView show];
}
elseif (state == SSPublishContentStateFail)
{
NSLog(@"分享失败,错误码:%d,错误描述:%@", [error errorCode], [error errorDescription]);
UIAlertView *alertView = [[UIAlertViewalloc]initWithTitle:nilmessage:NSLocalizedString(@"Share the failure",nil) delegate:selfcancelButtonTitle:@"OK"otherButtonTitles:nil,nil];
[alertView show];
}
}];
}
-(void)facebookShareImage
{
id<ISSContent> publishContent = [ShareSDKcontent:self.show_img.photo_description
defaultContent:@"iSDK"
image:[ShareSDKimageWithPath:bimg.data_small_path]
title:@"iSDK"
url:@"http://www.iSDK.com"
description:@"iSDK"
mediaType:SSPublishContentMediaTypeNews];
[ShareSDK shareContent:publishContenttype:ShareTypeFacebook authOptions:nil shareOptions:nilstatusBarTips:YES result:^(ShareType type, SSPublishContentState state,id<ISSStatusInfo> statusInfo, id<ICMErrorInfo> error, BOOL end) {
if (state ==SSPublishContentStateSuccess)
{
NSLog(@"分享成功");
UIAlertView *alertView = [[UIAlertViewalloc]initWithTitle:nilmessage:NSLocalizedString(@"Share success",nil) delegate:selfcancelButtonTitle:@"OK"otherButtonTitles:nil,nil];
[alertView show];
}
elseif (state == SSPublishContentStateFail)
{
NSLog(@"分享失败,错误码:%d,错误描述:%@", [error errorCode], [error errorDescription]);
UIAlertView *alertView = [[UIAlertViewalloc]initWithTitle:nilmessage:NSLocalizedString(@"Share the failure",nil) delegate:selfcancelButtonTitle:@"OK"otherButtonTitles:nil,nil];
[alertView show];
}
}];
}
- ShareSDK
- shareSDk
- shareSDK
- shareSDK
- ShareSDK
- shareSDK
- ShareSDK
- sharesdk
- ShareSDK
- ShareSDK
- ShareSDK
- shareSDK
- ShareSDK
- ShareSDK
- ShareSDK
- shareSDK
- ShareSdk
- ShareSDK
- android4.0 textureview
- Cxf
- Python 对Twitter tweet的元素 (Word, Screen Name, Hash Tag)的词汇多样性分析
- DelegatingFilterProxy的原理及运用
- web.xml里<filter-mapping>中的<dispatcher>作用
- shareSDK
- 团队理念和设计人员级别、职责
- shark等待文件死锁问题
- 介绍Hibernate中的NamingStrategy
- 2.2.10 Copy List with Random Pointer
- VC(VISUAL_C++)虚拟键VK值列表
- simple-spring-memcached简介
- memcached搭建缓存系统
- 软件版本管理原则