访问Facebook模块-芭蕾舞演员时出现未知类型“ FriendList”错误

时间:2019-01-08 06:25:59

标签: wso2 ballerina

我正在尝试从Facebook模块-芭蕾舞女演员(芭蕾舞女演员版本0.990.2)中获取FriendList。但是我收到未知的'FriendList'类型错误。我该如何克服这个错误?

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

1 个答案:

答案 0 :(得分:1)

您必须在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);
}