Then you can switch to the view controller where you want the user to follow another user
(WARNING: In the IGListViewController, the app crashes after running the follow method cause the "data" array changes and the table view can't show the followers anymore so I advise you to either use another view controller or to comment out all the tableView stuff in IGListViewController.m and in IGListViewController.h change "UITableViewController" to "UIViewController")
and, in the action you want, add the following code:
Replace "123456" in the method name with the instagram ID of the user you want to follow (just go to this website to lookup any instagram id: http://jelled.com/instagram/lookup-user-id)
In order to unfollow, block, etc. a user just replace "follow" with the action from Instgaram API relationship endpoints.
Hope I forgot nothing if you still have questions or something doesn't work, just comment :)
For everyone who has the same question that I had, I figured it out so here is the method to follow a user in the wonderful example app by @crino !
First, in IGViewController.m you have to change the login methods so that the user authorizes the app to change relationships:
At the end of -(void)viewDidLoad add the @"relationships" scope in the array of authorization:
Next, also in IGViewController.m, in the -(void)login method, do the same thing:
Then you can switch to the view controller where you want the user to follow another user
(WARNING: In the IGListViewController, the app crashes after running the follow method cause the "data" array changes and the table view can't show the followers anymore so I advise you to either use another view controller or to comment out all the tableView stuff in IGListViewController.m and in IGListViewController.h change "UITableViewController" to "UIViewController")
and, in the action you want, add the following code:
Replace "123456" in the method name with the instagram ID of the user you want to follow (just go to this website to lookup any instagram id: http://jelled.com/instagram/lookup-user-id)
In order to unfollow, block, etc. a user just replace "follow" with the action from Instgaram API relationship endpoints.
Hope I forgot nothing if you still have questions or something doesn't work, just comment :)