user3626615
user3626615

Reputation: 17

Change User Follow/Unfollow using STTwitter

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.

Upvotes: 1

Views: 206

Answers (1)

nst
nst

Reputation: 3882

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;

Upvotes: 1

Related Questions