码迷,mamicode.com
首页 > 移动开发 > 详细

ios 分享腾讯微博

时间:2014-10-27 17:02:18      阅读:182      评论:0      收藏:0      [点我收藏+]

标签:http   io   os   ar   for   sp   on   log   cti   

//初始化weiboApi

tencent=[[WeiboApi alloc]initWithAppKey:tencentAppKey andSecret:tencentkAppSecret andRedirectUri:tencentkAppReddirectURI andAuthModeFlag:0 andCachePolicy:0]

//通过auth2.0代理登录

 [tencent loginWithDelegate:self andRootController:self]
//代理成功,回调方式

- (void)DidAuthFinished:(WeiboApi *)wbapi_
{
    NSString  *str=@"";
    UIImage *pic = [UIImage imageNamed:@"install.png"];
    NSMutableDictionary *params = [[NSMutableDictionary alloc]initWithObjectsAndKeys:@"json",@"format",str, @"content",pic, @"pic",nil];
    [tencent requestWithParams:params apiName:@"t/add_pic" httpMethod:@"POST" delegate:self];
}

这儿有一个不太清楚的地方,即tencentkAppReddirectURI回调地址,该回调地址是:
  “我的应用》应用XXX》基本信息》应用网址”

ios 分享腾讯微博

标签:http   io   os   ar   for   sp   on   log   cti   

原文地址:http://www.cnblogs.com/shareze/p/4054303.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!