I am trying to get a list of posts in a particular group on facebook that is closed, also I am not the admin, just a member in this group. When I am trying to access the group's posts via graph explorer (I checked all the permissions) I am getting an empty list returned.
What is facebook's reason for not allowing this access? If I am a member of this group I have access to this information anyway via browser/scraping...
Your thoughts and suggestions are appreciated.
What is facebook's reason for not allowing this access? If I am a member of this group I have access to this information anyway via browser
That would be only you being able to see the posts then, fine. Two parties involved - you, and the other group members; everyone aware of who will be able to read the posts, all good.
But with an app, a third party gets involved - the app developer. And they could theoretically do anything with that data, that the app reads from the API on your behalf. (Sure, the app developer might be you in this special case here - but that is not the normal use case.)
And in a closed group people might discuss topics that are a little more sensitive than the current weather; think f.e. health problems or something like that. For sure not the stuff you’d want exposed to any third parties.
And therefor, the decision whether an app should be able to read the group’s feed posts, has been placed in the hands of the group admin(s).
If you would like to access the data use api version 2.3, the only downside is that it will be deprecated.
Related
I have a question about Graph Api from Facebook. We want to create tool to management accounts in facebook and groups releated with them.
Basic functionality of tool is possibility to add acounts to the system, and then add you can add multiple facebook accounts to each of them. Then, system get all posts from groups releated with facebook accounts.
I did research, and I know quite what is possible and what no, but many endpoints of API requires app review. My question is about this review - wheater app like that, when one user can add multiple facebook accouns and use data (like posts, comments) from them is allowed by facebook and will pass the review?
That depends on what exactly you mean by “accounts” …
Facebook pages? Sure, you can let your app user add as many of those as they like, for the purpose of managing them, reading feed data, etc.
User profiles? That would not really make sense, because every person is only allowed to have one personal profile on the platform to begin with. And adding other people’s profiles (by having them authorize your app, using their access tokens on behalf of someone else) is likely not going to fly in review either.
when one user can add multiple facebook accouns and use data (like posts, comments) from them is allowed by facebook
“Using data” is rather vague as well; what you can and can’t do with user data is outlined in the Platform Policy: https://developers.facebook.com/policy
I'm creating a service that needs to get all the public posts of a set of facebook users in real-time. The size of the set is variable and might grow a lot, let's say up to 500. All those users know me and are willing to authorize me (somehow) to read their data.
I've done something similar with twitter, it was really easy, I just followed all the users in the set, and used the streaming APIs to listen to updates on my twitter account.
I'm trying to do the same for facebook but the documentation confuses me and I can't understand the best way to do it. I don't think I can do it with just one subscription to the real-time APIs using my facebook account. I think that I might need to obtain a long-term access token for each user in the set, and then make a real-time API subscription for each of them. Is this the way to go? It seems over complicated to me.
To clarify things, I only need to read public posts, but I need to read them all, not just those that facebook think I might be interested in. I do not need to do anything on behalf of the users. The service will be always running and need to receive posts as soon as they are created, polling is not an option.
I am member of a facebook group, and the group is now growing to more than 2000 members, and somebody asked a question: where everybody was from. Cool question: nice to know.
That got me thinking: wouldn't there be a more convenient way to get this information? So I went looking for some API, found the Facebook Graph API, found the API explorer and dove right in.
So I create a token, and inside that token I generally declare what I am allowed to acces, but this token can only access ... the things I can access.
So, for instance it is possible for me to
list my groups
list members of one of those groups
So I assumed I would be able to get public info for those members, hoping I could find age/gender/location, and then I could create a map/dashboard of some kind, which would be cool.
But afaik that is not possible. If I request the details of a user, I get only the most basic info:
{
"id": "...",
"first_name": "...",
"last_name": "...",
"link": "https://www.facebook.com/app_scoped_user_id/.../",
"name": "...",
"updated_time": "2014-09-12T17:02:18+0000"
}
I attempted to get more fields, using the /#{user-id}?fields=gender,location but that does not show anything more. In a way logical, because my token does not allow me to access this particular user, only my own user (right?).
So my question is in general: how can I gather statistics of a facebook group?
Possible solutions I can think of:
request a token from all members, so I can collect their info? This seems completely impractical.
for each member I can visit their public facebook page, and scrape the public info
But as a total Facebook API noob I am guessing there should be better ways? Also I am actually not interested in the personal data, just the generic statistics of a group, but from the API documentation I did not find any entry for that.
Or should I create an APP and all members of a group have to "install that APP" and then you can install that APP in the group which would add an extra page??? (ok: obviously also a Facebook APP noob).
All help, tips or remarks are greatly appreciated.
The current Facebook API as you noticed will only give you extended info pertaining to yourself. To get extended information for other users, those use must sign into an app that you own and grant access.
You are probably looking for location which requires user_location permission https://developers.facebook.com/docs/facebook-login/permissions/v2.0#reference-user_location. Seeing that you will be using this for statistical purposes I don't believe you will permission request to Facebook will be reviewed.
With respect to your solutions
request a token from all members, so I can collect their info? This seems completely impractical. Agreed and you will not be approved for this permission anyway
for each member I can visit their public facebook page, and scrape the public info. You are violating the TOS and Developer policy here
So there is no way within the API, within policy to determine group statistics.
What follows is not recommended and just shows it is practical but not a good way to go about it
Facebook Native apps (Facebook for IOS/Android, Facebook Messenger, Facebook Pages) have special access to data and in addition are still running v1.0. Theoretically, one can use the access_token belonging to one of these apps then request the data /{group-id}/members?fields=id,gender,location is one way to do it.
Also all v1.0 applications still return the gender field for any user.
Is Facebook app Permission groups data still available via Insights?
This is described here (Facebook: Viewing how many users have approved a particular permission) but I don't see it when I go into Insights anymore.
This was really useful and I'm hoping it still exists via Insights (have not yet validated whether we can get it via the API). Has anyone seen it?
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.