Twitter 的 Sharekit 授权
我想使用 Twitter 授权用户使用我的 iPhone 应用程序。为了简单起见,我想使用 sharekit 来完成此操作,但我缺少一些基本的东西。我的理解是,您执行此操作的方式如下:
service=[[SHKTwitter alloc] init];
[service authorize];
我不清楚的是,授权过程完成后我如何收到通知。当我执行此代码时,会弹出一个模式视图控制器,并且用户通过 Twitter 授予访问权限。授权成功,模态视图控制器被关闭。我没有看到的是,一旦这一切完成,我有什么办法可以得到通知?我缺少什么?
I want to authorize a user for my iphone app using Twitter. I would like to use sharekit to do this for simplicity but I am missing something fundamental. My understanding is that the way you do this is as follows:
service=[[SHKTwitter alloc] init];
[service authorize];
What is not clear to me is how I get notified once the authorization process is complete. When I execute this code, a modal view controller pops up and the user grants access via twitter. Authorization is successfully made and the modal view controller is dismissed. What I don't see is any way for me to be notified once all this is complete? What am I missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在SHKOAuthSharer中检查两个方法(如果您使用OAuth授权):
1. - tokenAuthorizeView:didFinishWithSuccess:
2. - tokenAuthorizeCancelledView:
当授权视图关闭时调用它们。所以你可以在这里放置你自己的委托回调。
或者检查这个https://github.com/ideashower/ShareKit/issues/187
You could check two methods in SHKOAuthSharer (if you use OAuth to authorize):
1. - tokenAuthorizeView: didFinishWithSuccess:
2. - tokenAuthorizeCancelledView:
They where called when authorizing view is closing. So you could put your own delegate callbacks here.
Or check this https://github.com/ideashower/ShareKit/issues/187