Facebook test users (created for an app) are working different in some ways than normal users. Ie. they can’t like fanpages, so you can’t test if “create.edge” listener is setup correctly.
Is there a way to detect if user authenticated to app is test user? It would be useful to implement fake version of dialogs, that test user can’t use (ie. liking a fanpage).
My research:
- I have checked
signed_requestpassed to app and it looks same for test users as for normal users. - I have checked graph.facebook.com/[test user id] and it also look normal.
You cannot check if user is a test user basing on his Graph API details. Similarly, you cannot check if user like’s a specific page. You can however check your
page_idagainst user liked pages list. So in order to determine if givenuser_idis a regular or a test user, you’d have to check it against the application test user list:So the flow would be like this:
./likeslistpage_idand exit successful./accounts/test-userslistuser_idand exit successfulThat’s one extra call, but you can safely cache results for performance gains, since test users cannot be converted to regular users. I’d advice to cache the “likes” check for some time as well, but YMMV.