简体   繁体   中英

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.

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;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM