iOS:ShareKit>> Twitter设置>>回调URL ---是什么? [英] iOS: ShareKit >> Twitter Settings >> Callback URL --- What is it?

查看:145
本文介绍了iOS:ShareKit>> Twitter设置>>回调URL ---是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程式中尝试执行 ShareKit ;在 SHKConfig.h 文件中的需要Twitter应用程序设置的部分中,有一行应设置回调网址

I'm trying to implement ShareKit in my app; in the SHKConfig.h file, in the section where the Twitter applications settings are required, there is a line where I'm supposed to set the Callback URL:

我打开了一个Twitter应用程序在Twitter上填充了所有的领域,但我不清楚什么数据应该插入回调URL字段:

I have opened a Twitter application on Twitter and filled all the fields there, but I'm not clear regarding to what data should be inserted in the Callback URL field:

任何人都可以解释?

推荐答案

您在Twitter中的应用程序设置中编写的回调参数被忽略,您可以写任何内容,例如: http:// www .google.com (任何事情都会被忽略)。

The callback parameter you write in your application settings in Twitter is ignored, you can write anything, example: http://www.google.com (anything will do since it is ignored).

当您在#define中添加回调url时,其值将被发送到twitter在所有者授权步骤,并将覆盖您之前写在Twitter网站的价值。很奇怪,我知道。它与此安全漏洞相关。

When you add a callback url in the #define, its value will be sent to twitter in the owner authorization step, and will override the value that you previously wrote in the Twitter website. Weird, I know. It's related to this security vulnerability.

回调参数是Twitter的网址在认证后发送用户。

The callback parameter is the URL Twitter is going to send the user after authentication. When running in websites instead applications, the URL callback is used to recover control of the OAuth flow.

在应用程序上,您可以将其设置为自定义方案,如myapplication:/ / / twitter,然后在您的应用程序中注册scheme myapplication。这样,在身份验证后,在UIWebView或Safari中运行的Twitter网站会启动该网址,iOS会知道该网址已分配给您的应用,这就是您如何恢复对OAuth流的控制。

On Applications, you can set it to a custom scheme like myapplication://twitter and then register the scheme myapplication in your app. This way, after authentication, the Twitter website running in UIWebView or Safari launches that URL, which iOS knows is assigned to your app, and that's how you recover control of the OAuth flow.

这是理论,我不知道ShareKit的工作原理。它可能是在UIWebView上运行身份验证,并检测用户的活动以手动恢复控制,这是另一种方式。

That's the theory, I don't know exactly how ShareKit works. It may be that it runs the authentication on a UIWebView and detects the activity of the user to recover control manually, which is another way to do it.

这篇关于iOS:ShareKit>> Twitter设置>>回调URL ---是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆