The Friendship destroy works as expected when you are currently following a user.

But if you have made a Friendship create request to a user who has enabled private mode, and who has not yet accepted the offer, the Friendship destroy does not delete the request.

It means that even though the user has requested to retract from following a private user he will be following him after the private user has accepted his request.

I created some integration tests where I had to comment the validation of Friendship destroy.

You can find the tests here : tweetinvi/UsersIntegrationTests.cs at f2cf65dc8abe197cab43a7ed9b7fb438df9ab63b · linvi/tweetinvi · GitHub

3 Likes

Up post

If you send a follow request to a private user, it doesn’t count as a follow until the private user accepts. So using the POST friendships/destroy endpoint to remove the follow request will not work.

If you want to see if a user has a pending follow request, you could use the GET frienships/outgoing endpoint, and to see if your private authenticated user has pending follow requests, use the GET friendships/incoming endpoint.

I don’t believe there’s a way to cancel a follow request via the Twitter API at this time, but I’d strong recommend providing feedback here as we build the next version of the Twitter API. :wink:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.