How do I test a Facebook app since the recent introduction of login review?
You won't need to approval of permissions for the Admins, Developers and Testers of your app. You can define those in the App Dashboard, "Roles" tab.
https://developers.facebook.com/apps/[app_id]/roles/
When you login with one of those users, you can request all permissions.
Actually, this is also required to do when you submit for review. For example, when you want to request the publish_actions permission, your app must have used it in the last 30 days. This is for the reviewing team to check if you actually use that permission.
So, you will need to use one of the roles as defined on your app and then you can request any permission from that user.
edit: Note that even though you can request all of the permissions, you still have to actually request the permissions when you are logging in. So if you call /me/events
for a user (which happens to be you, an Admin/Developer of the app), you still have to request user_events
in the login scope permissions.
Related videos on Youtube
Alex Calothis
Updated on June 04, 2022Comments
-
Alex Calothis over 1 year
I am developing a Facebook app that makes an API call to get a list of the user's events.
The app will use Javascript which will call the user/events edge, something like this:
FB.api( "/{user-id}/events", function (response) { if (response && !response.error) { /* handle the result */ } } );
Since the end of April, with the introduction of the login review, this functionality won't work until my app is approved...
So my question is, how can I test the app before it gets approved??
I've read as much as I can find on this, and tried setting up a test user, but can't get any answers...
Obviously I can't submit my app for approval before it is tested, but it seems I can't test it before it is approved. There must be a way!
-
Alex Calothis over 8 yearsI'm not finding that it works in the way you have described. I log in as the app administrator, and the app does not work in the way I expect. When I request the events belonging to a page, for example, or to a group, I get an array of date returned. When I request the events for a user though, I get an empty array. If it is as you are saying, I should be able to get the user events, as the administrator...
-
Roemer over 8 yearsNo, that's not what I'm saying. I'm saying that you get the events of the admin, as if it were a normal user. You can never get information from other users without them approving the permissions. You can -test- your functionality with -your- admin/dev accounts. Not normal users.
-
Alex Calothis over 8 yearsI understand what you are saying, but this doesn't work either. I am the administrator of the app, and I have created an event on Facebook. Yet when I call the user/events edge with my user id, I get back a null array...
-
Roemer over 8 yearsAnd are you sure that you have requested and accepted the "user_events" permission? If you debug the access token with the Graph Explorer, do you see that permission?
-
Alex Calothis over 8 yearsYes! That was it... I can see my events now. Many thanks for your help!
-
Roemer over 8 yearsYou're welcome! I will edit my answer to emphasise the requesting of the permissions.
-
Alex Calothis over 8 yearsI have one more question - until recently, it was possible to get a list of friends' events, using the user/events edge. Will this be possible once my app is approved? In other words, will I be able to see my friends' events, if they have granted user_events permissions to the app? It's not working that way at the minute, when I try to get a list of events belonging to my test user. Each of us can see our own events, but not the other user's events.
-
Roemer over 8 yearsNo, that's not possible anymore. You can't get any information about friends anymore. See developers.facebook.com/docs/apps/…
-
Alex Calothis over 8 yearsHm... This seems overly strict - after all, I can see my friends' information on the Facebook page, so why not through an app?
-
Roemer over 8 yearsWell, that's the way it is now :) The rationale is that people don't like it that an app can get information about their friends. Or otherwise, that my friends can just give away my information (photos, for example) to any app. So that is now removed.