gpt4 book ai didi

iphone - 想要使用没有 OAuth 身份验证的 API

转载 作者:行者123 更新时间:2023-11-29 04:27:40 25 4
gpt4 key购买 nike

我想使用http://api.twitter.com/1/blocks/create.json?screen_name=xxxxxxx (Twitter API)使用 iOS 5 中的 Twitter 和帐户框架来阻止特定的 friend 或关注者访问我的帐户,

那么我应该怎么解决这个问题,因为我只想使用 Twitter 帐户,不想使用 OAuth。

它会生成如下错误:HTTP/1.1 401 API 是安全的。需要安全凭证

最佳答案

Twitter API 需要 OAuth 身份验证。但是,如果您愿意以 iOS 5 及更高版本为目标,您可以使用内置的 Twitter 框架代表您执行 OAuth 计算,这将为您节省大量时间。看一下 TWRequest 的文档:

http://developer.apple.com/library/ios/#documentation/Twitter/Reference/TwitterFrameworkReference/_index.html

关于iphone - 想要使用没有 OAuth 身份验证的 API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12108093/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com