新浪微博
来源:互联网 发布:mac excel2016加载宏 编辑:程序博客网 时间:2024/04/29 09:26
#import <Social/Social.h>
#import <ACCOUNTS/ACAccount.h>
- (IBAction)TouchFenXiangSina:(id)sender { if([SLComposeViewController isAvailableForServiceType:SLServiceTypeSinaWeibo]) { // 首先判断服务器是否可以访问 if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeSinaWeibo]) { // 使用SLServiceTypeSinaWeibo来创建一个新浪微博view Controller SLComposeViewController *socialVC = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeSinaWeibo]; // 写一个bolck,用于completionHandler的初始化 SLComposeViewControllerCompletionHandler myBlock = ^(SLComposeViewControllerResult result) { if (result == SLComposeViewControllerResultCancelled) { NSLog(@"Action Cancelled"); } else { NSLog(@"done\\"); } [socialVC dismissViewControllerAnimated:YES completion:Nil]; }; // 初始化completionHandler,当post结束之后(无论是done还是cancell)该blog都会被调用 socialVC.completionHandler = myBlock; [socialVC setInitialText:TieZiDetail->topic_content]; [self presentViewController:socialVC animated:YES completion:Nil]; } } else { UIAlertView *alert = [[UIAlertView alloc]initWithTitle:nil message:@"请在系统设置中登陆新浪微博账号" delegate:self cancelButtonTitle:@"确定" otherButtonTitles: nil]; [alert show]; }}
- 新浪微博
- 新浪微博笔试
- 新浪微博架构
- 新浪微博资料
- 新浪微博-注册
- 新浪微博笔试
- 新浪微博
- 新浪微博分享
- 新浪微博
- android 新浪微博
- android新浪微博
- 新浪微博框架
- 新浪微博收藏
- 新浪微博架构
- 新浪微博ios
- 新浪微博API
- 新浪微博授权
- 新浪微博----5.23
- SpringMVC中使用zTree
- Android高效加载大图、多图解决方案,有效避免程序OOM
- javascript 判断是否为数组或对象或各种其它数据类型
- android 得到所有安装的app
- Android 解决图片大量下载:软引用必须懂4点
- 新浪微博
- poj 1390 blocks
- sql防注入代码
- yii post delete request more safe
- Qemu/KVM虚拟化外设的几种方式
- Java_SSH项目主要步骤记录
- jfreechart 在纯jsp中画饼状图
- 虚拟机检测技术攻防
- c# xml操作类