完整的iOS新浪微博分享功能开发

2020-01-18 17:58:41王振洲

本文实例为大家分享了Android九宫格图片展示的具体代码,供大家参考,具体内容如下

做新浪分享 需先去http://www.easck.com/apps注册开发者app 很简单!

第1步

iOS新浪微博分享,新浪微博分享,iOS微博分享

第2步

iOS新浪微博分享,新浪微博分享,iOS微博分享3

设置你的应用的信息

iOS新浪微博分享,新浪微博分享,iOS微博分享

找到自己的appkey

iOS新浪微博分享,新浪微博分享,iOS微博分享

还需要设置自己的kAppRedirectURL测试可以随便写个!

iOS新浪微博分享,新浪微博分享,iOS微博分享

开发部分在下面ios新浪微博分享(2)这部分:

开发需要下载官方的sdkhttp://www.easck.com/wiki/SDK#iOS_SDK

iOS新浪微博分享,新浪微博分享,iOS微博分享

本人下载的版本

iOS新浪微博分享,新浪微博分享,iOS微博分享

新建一个viewcontrroler==WeiBoViewController

效果图

iOS新浪微博分享,新浪微博分享,iOS微博分享

iOS新浪微博分享,新浪微博分享,iOS微博分享

h文件


#import
#import "SinaWeb/SinaWeibo/SinaWeibo.h"
#import "SinaWeb/SinaWeibo/SinaWeiboRequest.h"
@interface WeiBoViewController : UIViewController<</span>SinaWeiboDelegate,SinaWeiboRequestDelegate>
{
 UIButton *_shareButton; 
 UITextView *_textView; 
 UIView *_shareView; 
 UIActivityIndicatorView *_indicator;}
@property (strong, nonatomic) UIButton *shareButton;
@property (strong, nonatomic) UITextView *textView;
@property (strong, nonatomic) UIView *shareView;
@property (strong, nonatomic) UIActivityIndicatorView *indicator;
@property (readonly, nonatomic) SinaWeibo *sinaWeibo;
- (void) addButton;
- (void) addShareView;
- (void) share:(UIButton*) sender;
- (void) removeShare:(UIButton*) sender;
- (void) sendShare:(UIButton*) sender;
- (void) exitShare:(UIButton*) sender;
@end