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.
Related
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.
I have an app that allows users of a (basically)WordPress site to share their posts to their Facebook business page (not user feed). Everything works great, I just have to submit the app to FB for review because I need the manage_pages and publish_pages permissions. How do I allow the Facebook reviewer to test this functionality when they need to have permissions attached to a FB page to be able to share a post to it?
I have created a login on my site for the reviewer. I have also created a test user on the app that the FB reviewer will be able to use, and I have used that test user to created a test page but the page is not accessible by my app or by any other user. The test page is set to Public. As I understand from what I've read in the FB docs, content by a test user (I'm assuming an FB business page qualifies as "content") is only visible to other test users. How can I set this up for FB to be able to review this?
As pointed out by CBroe, Facebook testers have their own pages with which to test permissions like this. I was over-worrying.
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
One of my friend's photo, can be searched by the following GRAPH API with v1.0 friends_photos & friends_status permissions.
v1.0/me/photos?type=tagged&since=1403366399&until=1404014399
To check this in v2.0, I did told my friend to become a user of our Facebook application. However, no matter which V2.0 permission is granted, the similar query cannot get that photo.
v2.0/me/photos?type=tagged&since=1403366399&until=1404014399
I did some pre-condition checks for this problem, and the results are
v2.0/me/photos?type=tagged works fine and can get some friends photos which tagged me.
v2.0/me/friends work fine, and that friend is in the friend list.
Any suggestion for this problem?
p.s. Forget to mention, that photo is posted at 2014/6/23, so, should not be legacy-related.
https://developers.facebook.com/docs/apps/changelog
https://developers.facebook.com/docs/apps/review
Check out the changelog, in v2.0 you have to go through a review process with most permissions including user_photos. Else, the permissions will only work for users with a role in your App (Developer, Admin, Tester). I assume your friend does not have a role in your App, so user_photos will not work before getting it approved by Facebook.
Our application just got the approve of user_photos, however, what my friend grant to our application is user_friends. And used test page to let her grant user_photos to our application, that photo still cannot be searched by V2.0/V2.1 API.
And after invited her to be developer, and grant our application user_status permission, that photo can get searched by v2.0/v2.1.
After some tests, user should grant user_photos, and user's friend should grant user_photos ,user_status. Then, the user can get all privacy-allowed photos fro that friend.
I set user_friends in my scopes permission in App Admin but when I check on debug does not appear and don't work on my app too.
Facebook Debug:
https://developers.facebook.com/tools/debug/accesstoken?q=CAAUmV9ZC6W1kBAIhAUJFVQ64ArT25JlIPDGyCCpZAx4VUvHqpOnPBaSEsn7wY0GZCczcT9YDE3C8kSHQu5xqJKFra9VlNk7opmuMa2FARetRYBfntcZB8BlKT0YiEGTqI3fVeJG39fz5PmEoSBpZCKzk6xZBknlZAAgYHRUVhczxtsahXFevI5rKIbNm7Yk0KLYjUrcyxpAEgZDZD&version=v2.0
Token:
CAAUmV9ZC6W1kBAIhAUJFVQ64ArT25JlIPDGyCCpZAx4VUvHqpOnPBaSEsn7wY0GZCczcT9YDE3C8kSHQu5xqJKFra9VlNk7opmuMa2FARetRYBfntcZB8BlKT0YiEGTqI3fVeJG39fz5PmEoSBpZCKzk6xZBknlZAAgYHRUVhczxtsahXFevI5rKIbNm7Yk0KLYjUrcyxpAEgZDZD
If you created your app after May 1st on facebook developer portal, you will be restricted to using the newer V2 API.
In the new API, you can no longer get a list of all facebook friends for a user. You can only get friends who are also registered with your application. So if you have no friends on facebook, that are registered on your app through facebook login/oauth, you will get an empty response.