func loadFollowers(userID:String) { //let twAPI = "https://API.twitter.com/1.1/followers/List.Json?cursor=-1&user_ID=\(session)&count=5000" let twAPI = "https://API.twitter.com/1.1/frIEnds/List.Json?cursor=-1&user_ID=\(userID)&count=10" let url2 = URL(string: twAPI)! print(url2) URLSession.shared.dataTask(with: url2,completionHandler: { (data,response,error) in //UIApplication.shared.isNetworkActivityIndicatorVisible = false do { let userData = try JsONSerialization.JsonObject(with: data!,options:[]) print(userData) } catch { NSLog("Account information Could not be loaded \(error)") } }).resume()}
输出:
{"errors": [ { "code": 215,"message": "Bad Authentication data." }]}
在frIEnds / List.Json API中发送的必需参数是什么.
在本文档中,他们给出的所有参数都是可选的
https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friends-list
以上是内存溢出为你收集整理的ios – 获取推特朋友列表?全部内容,希望文章能够帮你解决ios – 获取推特朋友列表?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)