I'm trying to get a list of friends using facebook explorer
https://developers.facebook.com/tools/explorer/{access-token}/?method=GET&path={fb-id}%2Ffriends&version=v14.0
access-token is auto generated (I'm using App Token) and {fb-id} is the Test User Accounts' id
This is what I got
{
"data": [
]
}
Just FYI: I'm using the test users as well as real accounts, and I've requested user_friends for my app (but currently rejected as I haven't been verified as individual and I haven't submitted my app for review)
On the app permission, it says that I've used user_friends API 25 times (for the past 30 days) -- but the number doesn't increase anymore
I could have sworn it works yesterday using my application, but now, it doesn't even works on the facebook explorer
This is the output that I see
fbFriend Connection[afterCursor=null beforeCursor=null data=[] nextPageUrl=null order= previousPageUrl=null totalCount=4 next=false previous=false]
Do I use the facebook explorer correctly?
Does anyone have the same problem?
thanks
Edited:
I've created test accounts with correct permission and invite/accept friend request from other test users
Per the User Friends documentation:
Only friends who have installed the app and who have granted the app the user_friends permission will be included.
Therefore, if no other user installed your application, you won't see them in the response. However, the total_count in summary object will reflect the actual number of user's friends.
Related
On my app, i have a feature that uses the user's facebook "user_friends" permission.
It used to work before they upgraded to API V.2.0, but now it does not:
When I created the app on FB and used test users (in development mode) my feature that includes this permission worked.
But, when i turned on the app (to be live) - it does not work.
So - it works on Test users but not on Live users.
How is that possible?
This is because /me/friends will only return those friends which also have used (via Facebook Login) the app making the request.
See
https://developers.facebook.com/docs/graph-api/reference/v2.3/user/friends/#readperms
This will only return any friends who have used (via Facebook Login) the app making the request.
If a friend of the person declines the user_friends permission, that friend will not show up in the friend list for this person.
So I am use the 2.3 API Version trying to access the /me/friends list that returns all of my friends who are also using the app. Except, it always returns the following:
{
"data": [
],
"summary": {
"total_count": 889
}
}
I have tried using the Graph Explorer as well as the JS Sdk right within the browser with no luck.
I am requesting the user_friends permission and it is actually included by default. And yes, I have many friends who have been using our app. I debugged the token online via Facebook's debugger and concluded the token does indeed have that permission.
NOTE: Our app isn't listed in the Facebook app store. It is however Live and available to the public.
Can someone help?
A user access token with user_friends permission is required to view the current person's friends.
This will only return any friends who have used (via Facebook Login) the app + making the request.
If a friend of the person declines the user_friends permission, that friend will not show up in the friend list for this person.
If user-a is friends with user-b in the above request, the response will contain the User object for user-b. If they are not friends, it will return an empty dataset.
Did you check this ?
I'd like to develop a Facebook app that reads statuses posted by a user's friends. However, it seems that I can only read friends' statuses if they've given the app a user_friends permission. So, to test my app before I actually release it to my friends, it seems I'll need to set up a test account, set up a friend relationship between that account and my account, and then have the test account give the app permission.
Is making a second account for this purpose allowed under the TOS?
Facebook has a tool (and API) for generating test users for your app, which you can find in your app's dashboard's "Roles" tab.
https://developers.facebook.com/docs/apps/test-users#managetool
Am trying to create a facebook plugin for a desktop application that we have, and this app will only be used by 1 facebook account to post results from it to the facebook page of the app.
It would be submitting on behalf of the app and not the user , so no user login is needed ( Except for the original user who manages the page )
The problem I'm having is to review a submission with new permissions, facebook requires screenshots of the app running, how do I get that, if I don't have permissions to actually use those features, I tried to create a test user with the "manage_pages" permission and I get an error.
Thanks to #WizKid , I wasn't aware of that, I was able to generate a token with the permission needed from the graph explorer ( I chose my app from the dropdown ) , and from within my app, I call graph api to exchange the short lived token for a long lived token that lasts "hopefully" 60 days , also need the app id and secret, and I was good to go
I have a Facebook App that requests the user_online_presence permission. When user A logs in, they should be able to see if user B is currently online (assuming they have both accepted the permission).
This functionality works fine if user A is friends with user B, but it breaks if they are not friends (I have tested by friending and unfriending the same user).
Why is this breaking? Shouldn't the application be able to see if user A and B is online assuming they have the permissions, regardless of their friend status?
Thank you for your help