I need to do something similar to the Facepile social plugin for a site I'm working on. The problem is the client does not have have a Facebook page, but instead has a Facebook Group (with some 4000+ members).
I guess I could urge the client to move their group members to a page, and I might do that in the future. But before I do I want to research how we're going to do Facebook-integration more thoroughly. For now I just need a quick fix.
While it's possible to list group members (with a 500 limit), your main issue is going to be the identification of your visitor.
The facepile plugin, like the other official plugins, is automatically connected if the current user has an active facebook session (because it's running on the facebook.com domain)
That allows it to display things like "xxx of your friends are already fan", even if the user is not logged to your site.
But if you program your own, you won't be able to access the current facebook session, you'll need to create your own session, which means you'll have to create a facebook application and have the user login to it before you can know how many of his friends are members of the group.
Also, there is no way to use the API to make a user join a group. This action has to be taken manually by the user.
Without an active user session, at best, you could list a random number of group members (using your own session key with the offline_access perm) and a link to the group.
If you want to list members of a group, here is the FQL query:
select name from user where uid in (select uid from group_member where gid = 146797922030397 limit 50)
Related
As you may know, Facebook Page Administrators can select for posts to be visible to only certain countries/langauges ( https://www.facebook.com/note.php?note_id=180817924821 ).
However, I would like to use the Graph API to retrieve feed messages ( /feed ) for ALL countries/languages or be able to select data for a specific country.
For example:
1) I would like to get ALL posts (and comments ...) from all of Starbucks Facebook Page. So no matter what the administrator says, just ALL.
2) I would like to be able to retrieve only the posts that are visible to users in Germany.
Are both these example actually possible? Probably, because I use access_tokens Facebook will probably use my own country/langauge to decide what data I get so that would mean I would have to change country all the time which is of course not an option to ask my users.
Any of you know what to do?
This is only possible if you're using the app as an admin of the posting page.
As you mentioned, the API will detect the user behind your access_token and only display posts that would normally be accessible to them on the desktop site.
This is an intentional restriction, so there's no way around it.
I need to constantly poll for all posts that a group have people have posted mentioning a specific Facebook page. I have a user which has admin privileges to that page but is currently not friends with the group of people I need to poll. I need to do this as authenticating through my Facebook app without having people constantly enter their password. My understanding is that there is no way to do this without becoming friends with the entire group of people. Is that true?
Is it even possible to do this with becoming friends with the entire group of people (assuming that the group let's my user see their posts)? Will the group need to authenticate to my app at any point? What permissions does my app need?
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 sort 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.
I have a Facebook page and would like to get a list of all admins. I have tried using the page and page_admin FQL tables, but they require that I specify a UID.
I know we can check if a specific UID is a page admin or not but what we are trying is to know who the admins are without the user telling us.
Oddly it seems that it is not possible to retrieve page fans or admins. It is possible to retrieve members of a group however.
You should request this feature on the developer bug tracker http://bugs.developers.facebook.com/
I'm developing a website using Facebook Connect as the only membership/authentication mechanism.
So far authentication and inviting friends work.
Now I'd like to display a list of users registered with my Facebook application. Something like : "There are 1234 members in the AppName community" + a list of profile pictures.
How would I do that ?
Thanks !
This is actually pretty easy to do. After each user connects with your site through Facebook Connect, create an entry for them in some user table (which you're probably already doing). Then when a user logs in simply display the total number from your users table and randomly select 10 user IDs (or whatever number of pictures you want to display) and show them using the FBML <fb:profile_pic> tag http://wiki.developers.facebook.com/index.php/Fb:profile-pic.
There is some metric information available about your application via the Admin.getMetrics API call. I believe it only provides the number of active users within a certain time period however.
The actual total number of users is difficult to track due to people who remove the application, or might have it installed but blocked. I don't think it's available as a specific property anywhere. The information pages about Facebook apps never show the total number of users, only the monthly active users, which is what Admin.getMetrics() can tell you.