图谱 API 版

/{user-id}/taggable_friends

此端点已停用。

可在发布到 Facebook 的动态中标记或提及的好友名单。

可在以下位置使用由 /me/taggable_friends 连线返回的标记口令:

读取

图谱 API 探索工具
GET /v19.0/me/taggable_friends HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->get(
    '/me/taggable_friends',
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
    "/me/taggable_friends",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/me/taggable_friends",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/me/taggable_friends"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

权限

  • 需要拥有 user_friends 权限的用户访问口令。
  • 若要使用此连线,您的应用需经过审核,然后方能由非开发者使用。

字段

可标记的好友名单:

名称 说明 类型

id

标记口令,只能用于标记此好友,不得用于其他目的。不应将此口令视为稳定的编号;除了在动态中标记好友,不得在其他情况下使用此口令识别好友。

string

name

好友姓名。

string

picture

好友个人头像。

object

url

个人头像网址。

string

is_silhouette

表示个人头像是默认的“剪影”图片,还是已经替换为其他图片。

bool

height

图片高度(以像素为单位)。heightwidth 仅在指定为修改参数时返回。

int

width

图片宽度(以像素为单位)。

int

发布

您无法使用此连线进行发布。

删除

您无法使用此连线进行删除。

更新

您无法使用此连线进行更新。