开发者

How can I integrate profile information of Facebook group members on an external website?

the question is in the title. I have been assigned to find out if the following is possible:

I create a group on Facebook. Selected people become members. On a external website, I want to display all group members with their basic info - picture, name, link to public profile.

I have skimmed the Facebook Dev pages, and so far it seems to me that this is not possible simply with Social Plugins. Do I have to write some s开发者_如何转开发ort of App for Facebook? It came to my mind, that there should probably some permission from the group members to display them, is that right? But this probably does only work with an App, not a group. So do I have to create an App and use the Graph API to include the data on the website?


Yes, you will have to create an app. The facepile plugin will show faces, but I do not believe you can target a group with it.

It should be a reasonably straightforward app to create: you will need the user_group permission and I believe that would be it.


If the group is public, just access it by going to https://graph.facebook.com/groupid and to get the members, access https://graph.facebook.com/groupid/members

If the group is private or closed, you will need to create an app so that you can get an access token. Look at their authorization documentation on that (you will probably need to create a temporary dummy website to do the redirects to Facebook and record the token then grant you). You will probably need offline_access to run the call over and over.

With that access token, access the groups api using the url format posted above and with the access_token appended as a query string parameter.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜