User_status returns data empty for SOME users - facebook

We have user_status permissions for one of our apps. Graph API 2.2 is being used to get user statuses (https://graph.facebook.com/v2.2/me/feed?access_token=".$access_token). It returns empty data sets for SOME users (I get public profile info for these users but not status data). The app is live and the review team has granted permissions for user_status and user_likes. (user_status is passed to the scope). Is this a bug or User_status is dependent on some other permission? Why does it happen for some users and not all?

As #CBroe mentioned, you should inspect the Access Tokens with /me/permissions to see if they really contain the user_status permission.
I wonder why you're using /me/feed instead of /me/statuses. Maybe this has an effect as well.
See
https://developers.facebook.com/docs/facebook-login/permissions/v2.3#reference-user_status
https://developers.facebook.com/docs/graph-api/reference/user/statuses/

Related

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.

Facebook Graph API {user-id}/feed from others empty

I want to get /{user-id}/feed from another user (user B) rather than "me" (user A), but the query returns an empty list.
I'm using the Graph API Explorer to make the queries, and I've got the Access Token with user_posts, user_status and read_stream permissions, but I can't get this information.
In this thread is said that:
Additionally the queried user needs to grant the app the read_stream permission.
In this other thread they said:
If the user is your app user authorized with read_stream permission, then you access the USER_ID/feed. It's because USER_ID/feed endpoint only available if user give permission read_stream to your app. App Access Token is not allow.
If the user is not your app user with read_stream, then you access the USER_ID/links instead. It's because no read_stream permission require to access this endpoint. App Access Token is not allow.
MY QUESTIONS:
Do I really need this other user (user B) to grant this permission to access his feed?
Where can I find official documentation saying so?
As /{user-id}/links seems to be accessible, are posts, statuses or tagged accessible too, or I just can access links without User B granting this permission?
Note:
Since the purpose is to use it in and iOS and Android App I can't use the read_stream permission, so I would use the user_posts which is supposed to be valid as they say in https://developers.facebook.com/docs/graph-api/reference/v2.3/user/feed
>
Of course, why would anyone want your App to access his newsfeed without his authorization? Keep in mind that not only the user would be able to access the feed of his friends, but the App too - which means, it would be easy for the App developer to get access.
Should be clear with number 1. Why would there even be a permission if you could just grab the feed from another user with it?
You canĀ“t get ANY data from a user without his authorization, for privacy reasons. Friend permissions are gone.

Facebook graph API won't return friends work history

Let's rule out the obvious...
My Facebook app requests the following permissions: user_work_history, friends_work_history
...so the usual suspect (insufficient permissions) isn't the source of my problem.
ISSUE:
The following graph api call works perfectly: /me/friends?fields=name,work
I get back names, ids, work history, etc. Just like you'd expect.
BUT
When I replace the /me with the user id of one my apps users (who has already authorized the app), I can only see names and ids (no work or education fields).
Why is this?
The reason why, is the access token you are using is not the access token belonging to the user you want to look at. Check out your token in the linter tool (https://developers.facebook.com/tools/lint) and see who it belongs to.
When you do get a user access token for that individual, then you can use it to get their friends. You wont need to specify /{userid}/friends?fields=name,work (although you could), just /me/friends?fields=name,work since the access token belongs to that user id.

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

Get user approved permissions in facebook graph API

After I add a permission, the user has to remove the app and add it again, in order to grant new permission. The weird thing is that when I request a permission that the user hasn't approved, I don't get an error, but rather only an empty result set.
How do I check if the user approved a permission?
It is quite simple as you can just use the openn graph API to get that information
https://graph.facebook.com/me/permissions?access_token=....