sinaweibosdk / weibo_ios_sdk Goto Github PK
View Code? Open in Web Editor NEW新浪微博 IOS SDK
Home Page: http://weibo.com
License: Other
新浪微博 IOS SDK
Home Page: http://weibo.com
License: Other
大家好,请问iOS新版本微博是否支持如下功能:分享出去的内容带有本APP相关信息,朋友们打开此分享,点击链接以后,通过一定方式(比如通过浏览器)调起我本地APP。
现在客户的需求是微信里面可以分享出去的优惠券,用户点击,通过浏览器可以将我本地优惠券APP启动,不知微博是否能够完成同样功能? 谢谢。
如题。微信最近开放出了登录功能,其接口中提供了两种类型的 用户 ID
openid 普通用户的标识,对当前开发者帐号唯一
unionid 用户统一标识。针对一个微信开放平台帐号下的应用,同一用户的unionid是唯一的。
请问微博SDK是否有(可以提供)类似于 unionid 的用户ID,以便标识同一账号下的不同应用所对应的用户。
从以前的版本中看到webview是通过加到UIWindow上实现的,而UIWindow是这样获得的:
UIWindow* window = [UIApplication sharedApplication].keyWindow;
我的应用中是先弹出系统actionsheet(ios7)后让用户选择分享平台, 调试时发现这时候通过这样的方式获得的window为_UIAlertOverlayWindow类型
怀疑现在的sdk也是这样实现的,导致我的应用中授权webview无法显示,然后在我在请求授权之前加了这句代码:
[[[[UIApplication sharedApplication] delegate] window] makeKeyWindow];
结果webview能正常显示了......
类似于Weico iOS客户端的登录界面,谢谢
当使用图文上传分享时,只有文字可以分享成功,图片无法成功上传到微博中。
您好,
在没安装微博应用程序的情况下,从iPad 上面发送SSO认证请求,微博显示的页面中虽没有需要输入信息的地方,但键盘却没有自动收起来。这样一来网页内容被挡上了,用户无法点选页面中的选项,必须自行退出键盘或向下滚动页面。我们希望可以改善这项用户体验。
希望在上述问题上得到您的协助。
谢谢。
Graeme
iOS version: 7.1
device: ipad mini2
1.打开新浪微博客户端授权
2.用户授权
3.返回调用的应用程序
4.Crash.
Log:
: * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[NSFileManager fileSystemRepresentationWithPath:]: nil or empty path argument'
*** First throw call stack:
(0x30601f03 0x3b0c6ce7 0x30601e45 0x30f39579 0x30f630e3 0x30f35875 0x30f62d51 0x7af62d 0x7a9eb7 0x10f115 0x10d495 0x9d5ad 0x32ea0cc1 0x32ea0613 0x32e9acc9 0x32e36c97 0x32e35df9 0x32e9a405 0x35460b55 0x3546073f 0x305cc83f 0x305cc7db 0x305cafa7 0x305357a9 0x3053558b 0x32e9962b 0x32e94891 0x9e133 0x9cc38)
如果这是最后的正式官方版本,请在 https://github.com/mobileresearch/weibo_ios_sdk_sso-oauth 中,明确 作出提示,并贴出本仓库的 URL。
另外,请维护一下 CocoaPods 的相关 Spec。
错误场景:
A(视图控制器)通过presentViewController跳转到了B(视图控制器)中,然后在B的按钮事件中调用了授权接口。无法实现跳转,并且出现的错误提示如下:
Warning: Attempt to present <UINavigationController: 0xa8ad560> on <ViewController: 0xa53afb0> whose view is not in the window hierarchy!
自己猜测原因大概是微博的sdk中,先通过keyWindow的rootVC的继承关系获得“根视图”。再通过presentViewController跳转到授权页面。
大概是类似这样吧:
[[SomeInstance getRootViewController] presentViewController:authorVC animated:YES completion:nil];
请相关技术人员帮忙看下:
这边的获取跳转到授权页面的源视图的方法即getRootViewController,是否应该做相应的修改。
或者说,如果我已经通过presentViewController跳转到了自己的某个视图控制器中,如何在这个控制器中调用授权接口吧。
更新到4.5版本后,在iOS7上分享图片,图片预览正确但是过于模糊;分享后的微博只有文字没有图片;附带的Demo工程可以重现该问题
WeiboSDK send WBAuthorizeRequest : 尚未安装微博客户端程序
当手机上已经装了sina的客户端时,请求授权时跳转到sina客户端授权,但授权之后就不能跳转回自己的app,这是怎么回事?但是如果手机本来没有装sina客户端,通过webview授权,一切正常。
有没有朋友遇到这种情况。
请更新一下
从2.4.2直接升上来,报错
感觉是mfp.cer的问题
2014-09-15 16:40:48.248 myapp[22225:60b] WeiboSDK openAppWithTransferObject
2014-09-15 16:40:48.264 myapp[22225:60b] WeiboSDK send WBAuthorizeRequest : 尚未安装微博客户端程序
2014-09-15 16:41:10.188 myapp[22225:60b] -[WBAuthorizeWebView initWithAuthorizeRequest:]: unrecognized selector sent to instance 0x15ecacb0
identifier, appkey 和redirect_uri写入demo运行正常
手机5c, iOS7.1.1
使用SDK版本: cf87ec0 最新
您好,
在发送SSO认证请求时,如果用户将被转换到微博应用中,在转换过程进行时,如果用户把应用转至后台运行,微博 SDK没有发出任何回应。这增加了我们在处理用户请求失败问题时的困难。望您给予协助。
在iPad上安装微博HD 应用。接着安装天巡航班应用,点选以“微博登陆”。当微博应用启动以后,假设用户当下马上点返回主页键,用户会返回天巡航班应用界面,而微博应用将处于后台运行状态。由于微博SDK 不会对这中情况发出反馈信息,所以我们只能设想用户的使用过程。在这种情况下,我们希望能接到微博SDK发出信息反馈用户登录失败。
希望在上述问题上得到您的协助。
谢谢。
Graeme
你好,在通过"https://upload.api.weibo.com/2/statuses/upload.json"这个接口分享带有图片的内容时,在有些时候会报如下错误,并导致分享失败。
Error Domain=SinaWeiboSDKErrorDomain Code=200 "Data parse error" UserInfo=0x1c52da20 {NSLocalizedDescription=Data parse error, error=Error Domain=JKErrorDomain Code=-1 "Reached the end of the buffer." UserInfo=0x1c5a8b10 {JKAtIndexKey=0, JKLineNumberKey=1, NSLocalizedDescription=Reached the end of the buffer.}}
能不能帮忙看一下,谢谢。
比如我自己弹出个ModalViewController,在这个视图里面再弹出SDK内置的发布器,点击关闭按钮会把我自己的ModalViewController也dismiss掉,建议加个可以设置类似RootViewController的属性,利用这个Controller弹出发布器,没设置才使用默认的。
希望这个问题能够尽快得到解决。
demo中:
WBWebpageObject *webpage = [WBWebpageObject object];
webpage.objectID = @"identifier1";
webpage.title = @"分享网页标题";
webpage.description = [NSString stringWithFormat:@"分享网页内容简介-%.0f", [[NSDate date] timeIntervalSince1970]];
webpage.thumbnailData = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"image_2" ofType:@"jpg"]];
webpage.webpageUrl = @"http://sina.cn?a=1";
message.mediaObject = webpage;
如果把webpage.title="xxx" 修改后分享到微博,发现微博显示的title还是“分享网页标题”;
另外webpage.thumbnailData 这张图在微博上也没有显示出来。
MARK:此功能需要商务合作。
两个疑问:
谢谢您。
2014-07-16 16:03:53.055 FamilyCircle[6942:907] 响应状态: -100
response.userId: (null)
response.accessToken: (null)
响应UserInfo数据: {
error = "sso package or sign error";
"error_code" = 21338;
"error_description" = "sso package or sign error";
"error_uri" = "/oauth2/authorize";
}
原 UserInfo数据: {
"Other_Info_1" = 123;
"Other_Info_2" = (
obj1,
obj2
);
"Other_Info_3" = {
key1 = obj1;
key2 = obj2;
};
"SSO_From" = LoginAndRegisterViewController;
}
如题
在实际的应用中,往往有不同的分享场景(aka 可能在多处进行分享),但,回调只有一处(典型地把 delegate 设为 AppDelegate)!目前的方法似乎只能通过 userInfo 来标识场景,然后在回调的地方判断分享场景并进行统一的回调处理。这使得代码变得不类聚。是否可以考虑以 block 进行回调?
如:
+ (void)requestWithMessage:(WBMessageObject *)message
onResponse:(void (^)(WBBaseResponse *resp))responseBlock;
或者引入 ReactiveCocoa 可以做的更漂亮:
+ (RACSignal *)requestWithMessage:(WBMessageObject *)message;
I've noticed that there are some unprefixed category methods on framework classes in libWeiboSDK.a.
[NSString(WeiboEncode) URLEncodedStringWithCFStringEncoding:]
[NSString(WeiboEncode) URLEncodedString]
[NSString(NSStringUtils) stringByReplacingRange:with:]
[NSString(NSStringUtils) trimmedString]
In order to avoid undefined behavior in third party apps, it's best practice to add a prefix to method names in categories on framework classes.
大家好。
我这边做优惠券的APP,分享出去的内容包括URL链接,这个链接打开时希望跳到我们网站这边来。
我的上线方法有两种。
将文字内容+URL链接一起放到message.text里面,由于URL(带了参数)比较长,很容易超140,启动微博客户端失败。
WBMessageObject* message = [[WBMessageObject alloc] init];
message.text = _message;
采用WBWebpageObject并设置webpageUrl ,问题是分享出去的票券打开链接无法跳出微博客户端,进而跳到我们官网微博,不符合产品需求。
WBWebpageObject * webPageObj = [[WBWebpageObject alloc] init];
webPageObj.webpageUrl = _url;
#1,message.text长度问题,#2链接跳转问题。 请问大家有没有什么好的解决办法? 谢谢。
If we don't already, we'll need to support 64 bit for any new builds that are sent to Apple from February 1, 2015. More info at https://developer.apple.com/news/?id=10202014a
能否把.a文件源码公开呢?
就一个这样的小程序,也舍不得公开源码,出了问题不方便修改
点解按钮后,log打出未安装微博应用,但未弹出webview验证界面
您好,
安装了微博 HD应用程序后,从iPad 上面发送了SSO认证请求,作为过程中的其中一步,用户接到登录提示,登录后,出现了请求无效的错误提醒。此外,如果用户通过关闭窗口以取消该SSO请求,微博 SDK没有发出任何回应。倘若用户先从应中登录微博,然后发出SSO认证请求的话,请求过程则如预期的一样,顺利完成。
当用户在 iPad 上安装微博HD应用程序,尚未登入其微博帐户。接着安装并启动天巡航班应用,点选以“微博登录”。用户将被连接到微博应用并接到登录提示。成功登录以后,界面将出现“访问出错了”的信息,用户则不知道如何从这里继续。这时,当用户回到天巡航班应用,再次使用微博帐户从天巡航班应用登录,(此时用户已经刚刚在微博上登录了),便能顺利登入,同时不会接到任何出错的信息。
希望在上述问题上得到您的协助。
谢谢。
Graeme
iOS客户端升级到最新版本之后分享图片出去只能看到问题,不能看到图片,这是什么原因?
在Xcode6.1创建的项目中,一运行[WeiboSDK registerApp:kAppKey]; 这一步直接崩溃
补充:在iPad上同时安装“微博 HD”和“微博”的情况下,[WeiboSDK isWeiboAppInstalled]返回true,这时分享调用的是“微博 HD”。
当一个iPhone专案在的iPad上执行时
只会检查、开启微博而不是微博HD
或是有什么解决方法
这个sdk里面调用http请求,请求授权都是采用的delegate的方式,为什么不该用block?
比方某一个程序在很多地方(ViewController)都需要微博的api使用,那岂不是需要每个ViewController都需要实现那个delegate的方法?如果有block的话,只需要在每个vc调用一下那weiboSDK类的block函数就可以了?
只支持armv7 arm64 i386 x86_64
请教一个问题,�在iPad上面,即使安装了微博APP, [WeiboSDK isWeiboAppInstalled] API总是返回NO, iPhone上面返回正确,这是怎么回事呀? APP端该如何解决? 谢谢。
注:
在调用[WeiboSDK isWeiboAppInstalled]之前,我还故意调用了[WeiboSDK registerApp:appKey];,但结果是iPad上[WeiboSDK isWeiboAppInstalled]仍然返回NO。
(id)initWithAppKey:(NSString *)appKey
{
self = [super init];
if(self) {
BOOL ret = [WeiboSDK registerApp:appKey];
[WeiboSDK enableDebugMode:YES];
if(!ret) {
return nil;
}
}
return self;
}
xcode 5.0.1,iphone上正常
We found that your app exhibited one or more bugs, when reviewed on iPad running iOS 8, on both Wi-Fi and cellular networks, which is not in compliance with the App Store Review Guidelines.
The Sina login interface did not display as intended. Part of the login interface was cut off so that we were unable to read and access the rest of the text.
Please see attached screenshots for reference.
这个问题会越来越多爆发。
您好,
在没安装微博应用程序的情况下发送SSO认证请求,微博网络界面显示无记录或超时导致连接消失。屏幕显示的是一个空白的页面而且不关闭。我们希望当上述的情况发生时,界面能显示一个错误信息。
希望在上述问题上得到您的协助。
谢谢。
Graeme
我们原来是用最新版的sdk来进行开发的,请求回openid之后进行下一步操作。
但是这么做有安全方面的问题,因为openid之类的都是公开的,所以我们需要像网站那样,通过授权回调页,让服务器端直接处理传过来的openid等数据,然后返回结果给客户端,请问现在的sdk支持这一功能么?如果支持的话,怎么实现?
如果移动端和网站两个key,我在客户端拿服务器一个接口的时候,想拿到我的微博好友里边注册过我网站的用户,这个怎么做呢。之前是客户端和服务器用同一个key,一次授权,给服务器token和openid,然后拿接口的时候服务器就可以拿到好友数据传给客户端,现在分开key的话,怎么办呢。。
XCode6.1 Swift项目
WeiboSDK 2.4.2
在AppDelegate中一运行 [WeiboSDK registerApp:kAppKey]; 这一步直接抛出异常:
'NSInvalidArgumentException', reason: '-[__NSDictionaryM weibosdk_WBSDKJSONString]: unrecognized selector sent to instance
尝试加过linking flag:-Objc
或-all_load
,都没用,
我们的ipad应用只支持left和right,但是sdk在非sso认证的时候弹出的网页只有portrait,这个有什么办法么?
for iPhone5S
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.