简体   繁体   English

如何取消Twitter与iOS应用程序的链接

[英]How can I unlink Twitter from my iOS application

I use ALAccount manager to connect to twitter and make a request. 我使用ALAccount管理器连接到twitter并发出请求。 I allow users to share their content to twitter via my app. 我允许用户通过我的应用分享他们的内容到twitter。 It works perfectly fine, however if a user decides they do not want to share content to twitter via my app anymore, I would like to create a button that will unlink their twitter account from the app. 它工作得非常好,但如果用户决定不再通过我的应用程序分享内容到Twitter,我想创建一个按钮,将他们的Twitter帐户与应用程序取消链接。

How can I achieve something like this? 我怎样才能实现这样的目标?

(Apps that have this feature: Instagram & Vine) (具有此功能的应用程序:Instagram和Vine)

Applications are granted access to Twitter's API using OAuth. 应用程序可以使用OAuth访问Twitter的API。 When an app is authorized by the user, it's given an OAuth access token. 当用户授权应用程序时,会为其提供OAuth访问令牌。 Most iOS OAuth libraries have the feature which stores this token to some persistent storage ( NSUserDefaults , the Keychain, etc.). 大多数iOS OAuth库都具有将此令牌存储到某些持久存储( NSUserDefaults ,Keychain等)的功能。 Find out where it is and delete it, and the user is now logged out. 找出它的位置并将其删除,用户现已注销。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM