Change User Follow/Unfollow using STTwitter

216 Views Asked by At

I initially staretd with twitter-fabrc but as their was not much documentation about how to extend the one-click login to access twitter sdk, shifted to STTwitter. Here i understand the login flow and getting user tweets but how do access the Rest API Endpoints https://dev.twitter.com/rest/public to make/destruct follow/unfollow relationships. Or suggest me a better way to go about it.

1

There are 1 best solutions below

5
On BEST ANSWER

Use the following STTwitterAPI methods:

// POST friendships/create
- (void)postFriendshipsCreateForScreenName:(NSString *)screenName
                                  orUserID:(NSString *)userID
                              successBlock:(void(^)(NSDictionary *befriendedUser))successBlock
                                errorBlock:(void(^)(NSError *error))errorBlock;

// POST friendships/destroy
- (void)postFriendshipsDestroyScreenName:(NSString *)screenName
                                orUserID:(NSString *)userID
                            successBlock:(void(^)(NSDictionary *unfollowedUser))successBlock
                              errorBlock:(void(^)(NSError *error))errorBlock;