Get Access Token for a closed group on facebook graph api - facebook

I'm trying to get an access token for a closed group so that i can display the group informaiton on my website, but unfourtunatly all the methods that i see to get an access token are for application which requires the appId and secret code. is there a way that i can get it for aa group cause it doesnt have the parameters specified on the doc.
Can some1 please help me out, i'm out of options.
Thanks
D

You can access the user and friends permissions. There is a specific user_groups permission. Generally the way Facebook authentication works is that the authenticating user will allow your application or (website) access to what they themselves have access to. So if a user is a member of a particular group and allows your application to connect through the user_groups permission, then your application will have access to this group to.
http://developers.facebook.com/docs/reference/api/permissions/

Yes it is possible to get the groups via graph api .
You need to get the user access token , then you can get the groups in which the user is the admin . user_id/groups
Scope - user_managed_groups
Hope this answers your question .
Reference Image - Graph Explorer

Related

Is it possible to read a secret or closed Facebook group feed with the API?

The Facebook API documentation doesn't clearly state if it's possible to read a secret or closed group feed that the user is a member of, and I didn't succeed no matter the permissions asked. It works with owned groups though (and the user_managed_groups permission).
Permissions
Any valid access token for a public group (i.e. the group's privacy
setting is OPEN).
A user access token for a member of the group.
The user_managed_groups permission can be used to read the group content
for a group in which the user is an admin. This permission also allows
the app to post as the user in the group if the app is also granted
the publish_actions permission.
An app access token can read posts it published in app and game groups that belong to it.
Does anybody succeeded reading a secret or closed Facebook group feed with the API?
The user_managed_groups permission can be used to read the group content for a group in which the user is an admin
As long as the user is admin, it should work. Afaik it does not work if you are just a member.

Facebook Closed Group Members for App

In the Graph API Reference it is stated that one can list members of group and permissions required for this action are
Any valid access token if the group's privacy setting is either OPEN or CLOSED.
Any valid access token implies that I could use App token. But using the Graph API Explorer and App Token, when the group is Closed, data returned is empty. This works only when the group is Public. If I try to use User Access Token, everything is fine.
Am I missing something here?
As it seems, it is a bug and facebook has confirmed it. Waiting for fix or at least documentation change.

Accessing the feed of a facebook group without admin permission

I'm interested in reading the posts in a private group that I'm a part of on Facebook.
Facebook's documentation shows that you can access a facebook group's feed with the following URL:
GET /v2.4/{group-id}/feed
However even after generating an access token with all permissions, this query always returns an empty array (and I know the group in question has posts in it):
{ data: [] }
One answer I have found suggests that this is because you need an access token for a user that is an administrator for the group.
Is this true? If so/otherwise, is there any way to access a facebook group's feed without admin access to the group?
Considering normal users have access to the group's feed, I would certainly expect there to be a way to do this.
The docs at https://developers.facebook.com/docs/graph-api/reference/v2.4/group/feed say:
Permissions
Any valid access token for a public group (i.e. the group's privacy setting is OPEN).
A user access token for a member of the group.
The user_managed_groups permission can be used to read the group content for a group in which the user is an admin. This permission also allows the app to post as the user in the group if the app is also granted the publish_actions permission. An app granted this permission can continue to use these capabilities even if the user stops being an admin of the group, although the user can remove the app from the group manually.
An app access token can read posts it published in app and game groups that belong to it.
Also, have a look at the changelog at https://developers.facebook.com/docs/apps/changelog#v2_4
the user_groups permission has been deprecated. Developers may continue to use the user_managed_groups permission to access the groups a person is the administrator of. This information is still accessed via the /v2.4/{user_id}/groups edge which is still available in v2.4.
So, if you're using v2.4 and the group is private, and you're not an admin of the group, I think you cannot access the group's feed.

How to get a user's groups/places through API (can see in browser, not through API)

This works: https://developers.facebook.com/tools/explorer/145634995501895/?method=GET&path=me/groups
This doesn't: https://developers.facebook.com/tools/explorer/145634995501895/?method=GET&path=1234567890/groups
(where 1234567890 is someone who is not a friend, but is in or applying to a group I admin).
However, this works:
https://www.facebook.com/1234567890
and I can see their groups just fine.
QUESTION: Is there a way I can act-as-me or other permission to see someone's groups through an app?
This is likely a permissions/token thing - but I need to 'act-as-me' and see what I can see/have-rights-to.
END GOAL: I need to assist my rejecting of automated spammed join-requests. Easy to recognize who is fake, so I want to automate that. But, how can I have an app see what I see in FB (without screen scraping).
Thanks,
Even though you can see their groups publicly, you can't get their groups using the Graph API unless you have a valid Access Token from that user with user_groups permission.
The documentation for the User Groups clearly says that:
A user access token with user_groups permission is required to view the groups that person is a member of.
A user access token with friend_groups permission is required to view the groups that person's friends are members of.
You can find more details about Access tokens here.

Facebook API manage_groups permission to create a group

I want to create and manage a group through the Facebook API. There are some older messages here (more than a year old) that say it can't be done -- is that still the case? Has anyone managed to do it?
I'm trying to mark groups' statuses as 'read' (so the unread count in the groups json via the Graph API goes down to 0). From what I can tell, to do anything with groups, you need a manage_groups permission, however using their OAuth for the Graph API, and trying to include the manage_groups permission returns an error suggestion the permission does not exist. Looks like a catch-22 for now.
Please consider subscribing to this facebook bug to help move it along faster:
http://developers.facebook.com/bugs/251651251563163
It looks like user_groups is the permission your looking for.
Any valid access token if the group is public (i.e. the group's privacy setting is OPEN)
"user_groups" permission to retrieve any groups that the session user is a member of.
The "user_managed_groups" permission can be used to read the group content for a group in which the user is an admin. This permission also allows the app to post as the user in the group if the app is also granted the "publish_actions" permission. An app granted this permission can continue to use these capabilities even if the user stops being an admin of the group, although the user can remove the app from the group manually.
https://developers.facebook.com/docs/graph-api/reference/v2.3/group