访问 Facebook module-ballerina 时出现未知类型 'FriendList' 错误

Getting unknown type 'FriendList' error when accessing Facebook module-ballerina

我正在尝试从 Facebook module-ballerina(Ballerina 版本 - 0.990.2)获取朋友列表。但是我遇到了未知类型 'FriendList' 错误。我该如何克服这个错误?

FriendList friendList = {};
var response = facebookclient->getFriendListDetails("");
if (response is FriendList) {
     friendList = response;
} else {
     test:assertFail(msg = <string>response.detail().message);
}

您必须在 FriendList 记录之前定义模块名称为 facebook:FriendList

facebook:FriendList friendList = {};
var response = facebookclient->getFriendListDetails("");
if (response is facebook:FriendList) {
     friendList = response;
} else {
     test:assertFail(msg = <string>response.detail().message);
}