我正在使用IBM SBT SDK。对于“获取我的书签”和“获取热门书签”例程,将通过以下方式识别用户:
var bkmkSvc = new com.ibm.sbt.services.client.connections.bookmarks.BookmarkService("connections");
var bkmks = bkmkSvc.getBookmarks(context.getUser().getMail());
在我的情况下,应用程序驻留在内部Domino和我现在使用温室的连接上。
context.getUser()。getMail()返回任何内容,因为我没有为Domino验证。
如何使用来自连接的用户ID来收集我的书签?
答案 0 :(得分:1)
您可以调用ProfileService https://greenhouse.lotus.com/sbt/SBTPlayground.nsf/JavaSnippets.xsp#snippet=Social_Profiles_Get_My_Profile
ProfileService connProfSvc = new ProfileService();
Profile profile = connProfSvc.getMyProfile();
out.println("my UserId "+profile.getUserid()+"<br>");
然后您可以使用该ID向后端书签发出请求 getBookmarks(String id)&lt; - 无论如何都使用id ...
我希望这会有所帮助