简体   繁体   English

多个 twitter 登录 MGTwitterEngine OAuth 帮助

[英]multiple twitter login MGTwitterEngine OAuth HELP

my problem is that i dont know what information needs to be stored for each user and when i've got the information, where do i need to change that information so that my app knows it's changed user.我的问题是我不知道需要为每个用户存储哪些信息,以及当我获得信息时,我需要在哪里更改该信息,以便我的应用程序知道它已更改用户。 i believe it has something to do with the access token provided, but that's all i've got.我相信这与提供的访问令牌有关,但这就是我所拥有的。

Any help would be much appreciated任何帮助将非常感激

you need the username and access token.您需要用户名和访问令牌。 You cannot store anything else on your application.您不能在您的应用程序上存储任何其他内容。 just send those as login parameters and you should be fine.只需将它们作为登录参数发送,你应该没问题。 You will need to create an method (by keychain or NSDefaults) to store this data on your application.您将需要创建一个方法(通过钥匙串或 NSDefaults)来将此数据存储在您的应用程序中。

I would suggest to use XAuth instead of OAuth... Best of luck!我建议使用 XAuth 而不是 OAuth ......祝你好运!

edit: The username and token are set after the engine instantiation.编辑:用户名和令牌是在引擎实例化后设置的。 If you have a list with usernames and tokens, on the instantiation of the engine you set them like:如果您有一个包含用户名和令牌的列表,则在引擎实例化时将它们设置为:

self._engine = [[XAuthTwitterEngine alloc] initXAuthWithDelegate:self];
self._engine.consumerKey = kOAuthConsumerKey;
self._engine.consumerSecret = kOAuthConsumerSecret;

I use the XAuthTwitterEngine, but it is probably the same for OAuth...我使用 XAuthTwitterEngine,但 OAuth 可能相同...

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

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