Facebook test environment - facebook

I'd like to add test pages to an existing Facebook a test environment;NOTE: I have already created an app, together with test-app & test users on developers.facebook.com. Everything is working fine.
I however need to test my stuff against a variety of Facebook pages, be users, or business pages, all done in sandbox mode (e.g. pages must be private). I haven't seen a quick start guides to do that on FB dev portal, and from what I found with google, others have resorted to create test pages. I'd rather use something that's tied up to an app in particular, so as to keep the testing configuration clean.
Can someone share pointers?

If you create a test user for your app and then use that test user to create a page it will not exist except for other test users of your app.
To create a test user for your app:
Go to https://developers.facebook.com/
My Apps > (Select your app that you want the test page/test user under)
Click the Roles tab on the left
Click Test Users in the tabs on the top
Add a test user (if you don't have one)
Click Edit next to the test user you want to use
Click Login as this test user
Follow the normal steps for creating a page

Related

How to test facebook chatbot with test user and test page

I have a chatbot that I want to test with test users on Facebook.
I have created a test app from the main app, per Facebook's recommendations. And in that I have created test users. Those account work and I can log into them.
To test a chatbot, you need to have a page that it's enabled on. So I have created a page in the test user account.
I can even see that chatbot app, correctly named, in the "Business Integrations" menu option.
I can also message the page from the test user account. However, those messages are never sent to the chatbot. There is zero traffic.
Using my real account, I can create a test page and link it to the very same test app for the chatbot and it works just fine. I can message that test page and the chatbot receives the message and processes it.
The difference is that on the app page, the "real world" test page shows up because I own it, so I can add it to the chatbot app. However as the test user is a separate user, the test user page doesn't show up in the options to add a page, only the pages that I own.
There is a menu option to log in as another user, but doing that as the test user gives the error that a test user cannot access the developer.facebook.com service. So no luck there.
So in short, it LOOKs like the test page is linked to the test chatbot app because it appears in "business integrations", but no traffic is routing.
Things changed in 2018 at Facebook. The old way of using Graph API to link your test page to your chatbot app no longer works. Facebook's own documentation is massively out of date and their recommendations not only don't work, the permissions tags no longer exist.
Has anyone solved this puzzle?
You have to use the test user to create a test page and then issue commands directly through the graph API (using curl, for example) to allow the page to use the app. The details for doing that are available on a FB bug report linked in this answer Can you use Facebook "Test Users" to test a Messenger Bot?
The test user cannot see your own pages nor see you but you can see the test page created by the test user and interact with it. Sadly, because the test user cannot see you, the bot cannot get the information about the user interacting with the page either (which might cause exceptions in your bot code). The best way is to interact using a separate test user.

Facebook Test User unable to access my web page

I am trying to test the Facebook login feature for a website staging environment, but when logging in with a test user I see this error message:
Error
User is not allowed to see the application.: The user is not allowed to see this application per the developer set configuration.
I have set App Domain to http://www.mysite-stage.com/. I've also added a Website platform for my app and set the site URL to http://www.mysite-stage.com/.
The website http://www.mysite-stage.com is actually accessible to everybody on the web, so there should be no issues there.
This method of testing Facebook integration for the site was working up to about 1-2 months ago, so I'm a little confused as to why it's not working anymore.
Are you sure you created the test user for that application?
Facebook won't let you login as a test user that was created under a different app than the one you are trying to sign in with.
Facebook test users are app-specific.
Yo can also create test users through the facebook developers site:
http://developers.facebook.com/apps/
- Select your app
- Roles
- Test Users
Since I can't add a comment yet, the problem is with you having made your app available to the public but you are trying to sign in with a test account.
Have you tried using the
installed=true
parameter once you use
POST /{app-id}/accounts/test-users
to create the Test Users? See https://developers.facebook.com/docs/graph-api/reference/app/accounts/test-users#publish

Test users and unpublished Page

Just a quick question - I seem unable to access my unpublished Page using a test user that I've created for an app I'm developing. This app is tied to the unpublished Page as a tab, and every time I try to navigate to the Page with a test user I'm redirected back to the test user's wall.
As a test I published the Page and this time I was able to get to the app using the test user.
Surely we can test our Page and Apps together using test user accounts, whilst keeping the Page and Apps in a sandboxed state?
Cheers
Lee

How do I test a Facebook page tab app without creating a public page for it?

I'm developing a FB page tab app, and I want to provide my client a URL for testing the app. I don't have a page specifically for this app, nor do I want to create one - the test versions of the app should remain private. What is the normal process for testing page tab apps privately in this manner?
Try this:
Go to your application: developers.facebook.com/apps
open your app, on left side there is a section called advanced (settings->advanced),
just click on that and you will find create a facebook page option,
you can create a facebook page and after creating,
you can set setting for publish or unpublish.
You have to enable the Sandbox Mode in your app settings.
If you want to give other users access to the app, you need to add them as developers or testers in the Roles settings.

Viewing application on fan page using test user/test account

I am using Selenium to do some testing bits and pieces so have created myself a test account successfully.
The problem that I'm having is that when I view most fan pages I can not see any of the applications that I would like to test. Accessing the application directly doesn't work either.
However, one of my fan pages does show one of the applications but the rest don't and I have no idea why.
I have double checked this on facebook.com/disney and again I can't see any of their application links.
Can test accounts even "see" applications? Do I need to modify my test user in some way?
You must assign test users to your application in the App Settings.