1.前往sina开放平台下载支持库
libWeiboSDK.a+WeiboSDK.bundle+WeiboSDK.h
2.在.m文件中注册appId
[WeiboSDK enableDebugMode:YES];
[WeiboSDK registerApp:kAppKey];//kAppKey应用前往新浪开放平台注册的appID
3.调用分享事件
WBMessageObject *message = [WBMessageObject message];
message.text = @"分享文字";
WBSendMessageToWeiboRequest *request = [WBSendMessageToWeiboRequest requestWithMessage:message];
WBImageObject *image = [WBImageObject object];
image.imageData = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"icon" ofType:@"png"]];
message.imageObject = image;
[WeiboSDK sendRequest:request];
4.回调方法
- (void)didReceiveRawData:(NSData *)data reqNo:(int)reqno
{
}