• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Twitter REST API Method: friendships exists

Page history last edited by Marcel Molina 14 years, 1 month ago

<< Back to Twitter API Documentation

 

friendships/exists

Tests for the existence of friendship between two users. Will return true if user_a follows user_b, otherwise will return false.

method status | report a bug
 
Hey there: Why not try the friendships/show method, which gives you even more information with a single call?
 

URL:

http://api.twitter.com/1/friendships/exists.format

 

Formats: 

xml, json

 

HTTP Method(s):

GET

 

Requires Authentication (about authentication):

true if user_a or user_b is protected

 

API rate limited (about rate limiting):

true

 

Parameters:

  • user_a.  Required.  The ID or screen_name of the subject user.
  • user_b.  Required.  The ID or screen_name of the user to test for following.

 

Response (about return values): 

          XML example:

<friends>true</friends>

 

JSON example:

true

 

Usage examples: 

cURL (about cURL):

curl -u user:password http://api.twitter.com/1/friendships/exists.xml?user_a=dougw&user_b=al3x

 

          Do you have an example to share in the language of your choice? Please share!

 

<< Back to Twitter API Documentation

Comments (0)

You don't have permission to comment on this page.