Viewing application on fan page using test user/test account - facebook

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.

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.

Test multiple apps on facebook

I freelance now and I am wanting to set up a Facebook account so I can create multiple apps for different clients under this account, then become admin and roll out the app totheir page.
Does anyone else do this and if so how best is it to set up from the outset as I will need to test without the public seeing etc.
Yes - I do this frequently...
Placing your application in sandbox_mode will ensure that only the people who are allowed to see the application have access to it.
You can also add your applications to your own un-published Facebook page, that way no one will be able to search for your page or application either.
A mixture of sandbox_mode and an un-published page should be the safe way to go. Check out the Application Security page in Facebook's documentation for exact explanations of sandbox_mode and the roles you can give users in your application.

how to bugtest facebook apps in private?

I'm just trying to develope a facebook app, so sorry if this question is quite simple. I've set up my App, then entered the canvas URL and thought I could test the app and fiddle around with it in private without anyone knowing. But there was immediately a "is using 'hisnewpp'" message going around or something. Of course I didn't want that since the app is not finished. I couldn't find a setting anywhere, where I could set the app to be public or private.
So in short: where can I call up and test my App on Facebook, without it beeing accessable to anyone else?
Thanks a lot
you want to enable sandbox mode in your application's advanced settings. Only you will see the updates then.
Use test users - https://developers.facebook.com/docs/test_users/
You can create temporary or long term test accounts specifically for testing your app - either via the API or in the app settings. You can also place the app in sandbox mode and only developers or testers of the app can interact with the app and/or see the content it produces

Facebook application load testing

How can i make load testing to facebook application?
Facebook prohibits the use of automated tools!!!
You should just load test your code, not Facebook's. Your app should be an iframe app, so it shouldn't be hard to load test outside of the Facebook platform. Just disable the Facebook calls.
Facebook has a much bigger setup than you and can handle a much larger load than your load testing tools could probably generate. And if Facebook is having load issues, there is nothing you can do about it anyway.
I've been developing Facebook apps for about 3 years. Facebook does have issues fairly often, but there is nothing you can do in your app except add error capture, retry and/or recovery.
What you're looking for is a tool called FriendRunner (www.friendrunner.com) which will allow you to load test a Facebook app WITHOUT modifying it, so you don't have to comment out any API calls. This will give you the most authentic results.
They can also simulate all kinds of strange situations and problems with the Facebook API so you can see how robust your application really is.
Is there a way to decouple your app from Facebook for the purposes of load testing? You can probably assume that the facebook platform can handle everything you throw at it, so you really just need to test your custom code. Once this works without any load problems, you should be good to go (assuming you can properly deal with unusual cases like facebook being down/the api being down).
We've used the approach suggested by Brent Baisley and it's a good approach, but I've always begrudged the extra work of toggling FB apis to test the app. We are trying an approach right now that should allow you to load test most apps directly in the FB canvas.
From Facebook themselves: "You can use test users for manual or automated testing."
You can also pre-authorize test users with specific permissions to your app so there's no issue of getting stuck at the permissions dialog. In the FB response, you'll get a URL that allows you to login with that test user. With one or many of these URLs in hand, easy enough to use something like Seige or Apache Bench to automate your load testing of your Facebook App in its normal environment.

How do you limit a Facebook app to a small number of people during testing?

I know about test accounts, but during beta I'd like to allow access only to my friends, and then later friends-of-friends, and then only eventually Kevin Bacon and his friends.
That would probably suck, wouldn't it? The app would be listed (is there a way to prevent listing?) and someone I don't know might try it and get a "sorry, this is in development message." I imagine they'd be irritated and not come back.
From what I've read, only a few apps take off, but when they take off, they REALLY take off. Do developers just release these things fully baked?
Anyone start out with OpenSocial or other smaller-than-Facebook networks?
Any ideas for a soft, gradual, restricted roll-out?
Once you've set up your application, there is a setting in the Developer application control panel for your app: Your app -> Advanced -> Sandbox Mode.
Sandbox mode lets you restrict access to only those people listed as developers (under the Basic section).
In terms of expanding the app, Facebook doesn't provide much more flexibility that the Sandbox mode. Unfortunately, adding everyone as Developers of the app doesn't work very well for a beta, as people can access the application control panel once they are a developer. I ended up putting a whitelist of Facebook Ids into the front controller of my application for a previous beta, and it worked fairly well.
The apps are only listed in the App Directory if you submit them and they are accepted. There's no issue about preventing listing, it's something you have to apply for.
As for restricting users, you can accomplish it with a script in the application that checks whether the currently logged-in user is within your restricted user set. For example, if you only want friends of yourself, check whether the current user is friends with your user id. If not, simply display an error/message page or redirect them to the Facebook home page (or wherever). Add this check to the rest of the start-up logic run each page (such as connecting to your DB and authenticating with Facebook).
What I have done in some cases is keep a database table with the user id's of users who are allowed access, essentially a "whitelist". If the user isn't in the table, redirect them.