简体   繁体   English

Facebook为Facebook朋友准备信息

[英]Facebook prepare information for facebook friends

Dears, I've checked Facebook's documentation and read multiple posts regarding this topic. 亲爱的,我检查了Facebook的文档,并阅读了有关该主题的多篇文章。 It seems we are now only able to retrieve user's friends which are also using the application. 看来我们现在只能检索也在使用该应用程序的用户朋友。

An alternative is to send a Dialog box to "invite" them or share links. 一种替代方法是发送一个对话框来“邀请”它们或共享链接。

Each user of my web platform has its own website and can give access to his website to any user. 我的Web平台的每个用户都有其自己的网站,并且可以将访问其网站的权限授予任何用户。 I can send invitation links using a GUID to his facebook friends, but I would like to list his friends, let him choose the ones he wants to invite and assign them a unique code and some other information before sending them the invitation link. 我可以使用GUID将邀请链接发送给他的facebook朋友,但是我想列出他的朋友,让他选择他想邀请的朋友,并在向他们发送邀请链接之前为他们分配一个唯一的代码和一些其他信息。

Is this something feasible with the latest Facebook api ? 使用最新的Facebook API可行吗?

The "invitable_friends" endpoint is only for "games" as mentionned in the documentation. 如文档中所述,“ invitable_friends”终结点仅适用于“游戏”。 I had to use the "taggable_friends" endpoint. 我必须使用“ taggable_friends”端点。 I'm using spring-social plugin and I ended up with something like this : 我使用的是spring-social插件,结果却是这样的:

        Facebook facebook = new FacebookTemplate(getUserFromSecurityContext().getFacebookAccessToken());
        String guid = (String) session.getAttribute(FRIENDS_NEXT_PAGE);
        PagedList<UserTaggableFriend> friends;
        if (null != guid) {
            friends = facebook.fetchConnections("me",
                    "taggable_friends?after=" + guid, UserTaggableFriend.class,
                    "id", "name", "picture", "first_name", "last_name", "middle_name");
        } else {
            friends = facebook.friendOperations().getTaggableFriends();
        }

where 'guid' is a link to the next or previous page. 其中“ guid”是指向下一页或上一页的链接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM