I'm using pod 'SwiftInstagram', '~> 1.0.6' for Instagram login and fetching user This error is coming from fetching Instagram followers list.
private var api = Instagram.shared
func getUserFollowers (completionHandler: @escaping (Bool, InstagramUsersObject?, String?) -> Swift.Void) {
api.userFollowers(success: { (users) in
// success, got the user followers
print(users)
let followersList = self.createJSONObjectForInstagramUsers(data: users)
let userList = Mapper<InstagramUsersObject>().map(JSONObject: followersList)
print(followersList)
completionHandler(true, userList, "")
}) { (error) in
// error while fetching user followers
//InstagramError(kind: invalidRequest, message: "This endpoint has been retired")
print(error)
completionHandler(false, nil, error.localizedDescription)
}
}
Please understand there are 4 major changes using Instagram API.
So presently error you are facing is related to the first issue, Please change your code to handle other 3 scenarios.