Friendships/exists

跳转到: 导航, 搜索
(创建新页面为 '== friendships/exists == Tests for the existence of friendship between two users. Will return true if user_a follows user_b, otherwise will return false. === URL: === http://ap…')
 
(friendships/exists)
第1行: 第1行:
 
== friendships/exists ==
 
== friendships/exists ==
 +
判断两个用户是否有关注关系,如果user_a关注了user_b则返回true,否则返回false.
 +
 
Tests for the existence of friendship between two users. Will return true if user_a follows user_b, otherwise will return false.
 
Tests for the existence of friendship between two users. Will return true if user_a follows user_b, otherwise will return false.
  
第18行: 第20行:
 
   
 
   
 
===Parameters:===
 
===Parameters:===
 +
* user_a.  必填参数,要判断的用户UID或用户账号
 +
* user_b.  必填参数,要判断的被关注人用户UID或用户账号.
 +
 
* user_a.  Required.  The ID or screen_name of the subject user.  
 
* 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.  
 
* user_b.  Required.  The ID or screen_name of the user to test for following.  

2009年11月5日 (四) 16:39的版本

目录

friendships/exists

判断两个用户是否有关注关系,如果user_a关注了user_b则返回true,否则返回false.

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

URL:

http://api.t.sina.com.cn/friendships/exists.format

Formats:

xml, json

HTTP Method(s):

POST, DELETE

Requires Authentication (about authentication):

true if user_a or user_b is protected

API rate limited (about rate limiting):

true

Parameters:

  • user_a. 必填参数,要判断的用户UID或用户账号
  • user_b. 必填参数,要判断的被关注人用户UID或用户账号.
  • 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.t.sina.com.cn/friendships/exists.xml?user_a=dougw&user_b=al3x