简体   繁体   English

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

[英]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. 我最初盯着twitter-fabrc,但由于他们没有太多有关如何扩展一键登录以访问twitter sdk的文档,因此转移到了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. 在这里,我了解了登录流程并获得了用户鸣叫,但如何访问Rest API端点https://dev.twitter.com/rest/public来建立/销毁关注/取消关注的关系。 Or suggest me a better way to go about it. 或者向我建议一种更好的解决方案。

Use the following STTwitterAPI methods: 使用以下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;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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