使用STTwitter更改用户关注/取消关注

时间:2014-12-18 12:31:55

标签: ios xcode twitter sttwitter

我最初使用twitter-fabrc进行了staretd,但由于他们没有太多关于如何扩展一键登录以访问twitter sdk的文档,转而使用STTwitter。在这里,我了解登录流程和获取用户推文,但如何访问Rest API端点https://dev.twitter.com/rest/public来建立/破坏跟随/取消关系。或者建议我一个更好的方法来解决它。

1 个答案:

答案 0 :(得分:1)

使用以下STTwitterAPI方法:

// 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;