Use Facebook account in Selenium tests - facebook

I'm using selenium for integration tests, so it clicks through our web app, logs into Facebook and do some actions. Facebook started to block account used in those tests and send an email "Did you log in to Facebook from somewhere new?"
All logins are done from same IP, same OS (Linux, Jenkins) and safari browser. I've marked several times that it's me who logged in (well, its jenkins;p). We run those tests every 30 minutes -- sometimes it ok for couple days, sometimes account is blocked right away.
Is there any way to mark an account as 'safe' for such actions?
Update:
Seems test accounts are a way to go -- didn't see them before:
https://developers.facebook.com/docs/facebook-login/testing-your-login-flow/.

For testing purposes, you can use Test Users: https://developers.facebook.com/docs/apps/test-users
You can create/manage them in the App settings or even with the API.

Related

Facebook API - Need publish_pages and manage_pages but Failing Review

My code is working properly in dev mode, but I can not get approval to use publish_pages or manage_pages. I keep failing every review.
The problem is that the software is to be ran as a cron job and there's really no user interface. This is for an auction website and we want to post a summary of auctions for the next day in our feed.
For some reason they keep saying:
Your screencast doesn't show how the use of this permission directly improves the user experience in your app. Unfortunately we also weren't able to determine this from testing your app manually
Right now, if I have the app in dev mode the post submits successfully, but only my user account can see them, so I've been having to leave dev mode on, let the app post, and then turn the app live.
This is less than ideal. Is there any 3rd party application that has already been approved I can use to post to our facebook page?
It seems like the magic is making sure to mention "this is a server to server application with no user interface" is all that's required to get your app approved. After doing that, it went through without an issue.

Facebook Testers Can't run my Facebook Dev Canvas App

I have taken the following steps:
On the Facebook dashboard, I created a Facebook App.
Also on the dashboard, I created a test app as a child of the Facebook app (the Dev version, for testing).
I uploaded a build of my app, and confirmed I could run it from the
admin account.
I gave two of my real-world Facebook friends the Tester role in the
dashboard.
When the real-world friends try running the app, they get 404 errors
"the requested URL was not found on this server" when it tries loading
"https://apps-APP_ID.apps.fbsbx.com/hosted-canvas/e30=/.
I am using Facebook's Simple Application Hosting. The url for the app is "https://apps.facebook.com/APP_ID". When the admin hits this it works fine, when the Tester hits it they get the error. Some have suggested that there is a sandbox setting that needs to be turned off, but I see no such thing in any of the settings on the Dashboard. Any insights you could offer would be greatly appreciated.
Not sure if it helps anyone figure it out, but the app consists only of a data file, a Javascript file (xxx.js), and an index.html.
Holy moly - alright I'm hoping this helps someone else out. Apparently, when you create an app, and then create a test app so that you can establish a dev environment for testing - which is standard procedure - you have to add any testers to the parent (production) app under "Roles". I was only adding it under "Roles" for the test app, which apparently is not enough. If anyone from Facebook is reading this, please update your docs, or update the dashboard to issue a warning to people who only add testers under the test app.
We also have to push the app to production (though yet to approved),
If the status is set to "testing", only admin user can find it in my case.

Facebook blocking test accounts

I'm doing testing with Facebook and Facebook apps and have run into an issue with the test accounts. When I create a test account (under the app roles) and begin testing the app and the account, it keeps getting banned. To test my app and get all the information I need, I need to upload a bunch of albums to FB, but this keeps causing the account to get blocked. I was under the impression that the whole point of Facebook Test Accounts was that they were cloistered from the rest of FB and were exempt from odd behavior and being blocked. Has anybody else experienced this before? Is there a way to keep my test accounts from getting blocked so that I can actually do the testing I need to do with them?
We have succefully used a bunch of FB accounts for manual and automated testing. Make sure that test users are under your test app. If you think that everything is done in right way, try to contact FB support team for help.

Adding tester and admins to FB app

I'm sure this is something blindingly obvious, but I can't work it out.
I've added an admin and a tester user to my app (and I mean they're real people as opposed to the generated random named user that FB offers) but after a couple of weeks they're still listed as '(pending)' and they're unable to login to the web page that I've written using their Facebook account. OAuth responds with an error:
Sorry, this feature isn't available right now: An error occurred while processing this request. Please try again later.
I appear to be able to login just fine and can test the [currently] limited functions.
Our web page is right at the beginning of development but it's now at the stage where I'd like real people to mess around on the page and give me feedback.
The two users haven't received any messages - I sort of expected they'd get something in their inbox asking to confirm their role with the app.
So how do I go about getting real people to be test users? Have I missed the point of the test user role?
As of this writing (things change), have the Facebook user go to https://developers.facebook.com/requests/
They will need to be logged in to Facebook.
There should be listed one or more pending requests that they will need to confirm. If the Confirm button(s) is disabled, they may need to register as a Facebook Developer before the Confirm buttons are enabled.

Facebook Log in Issue

I'm using Unity and prime31 plug in to access Facebook via my iPhone. I'm trying to test requests via my app by sending a request to a second test Facebook account on my iPhone (so I have my primary Facebook account and I've created a second one for the purposes of testing).
The problem I'm coming across is that I'm logging out of my normal Facebook account on the Facebook app and then logging into my test account. I'm then running my own app to test the requests. However, when I execute a 'me' graphrequest, it's still returning the details of my primary account (even though I logged into my test Facebook account before running my app).
I don't quite understand why it's doing this - I understand that there is a facebook settings page within iOS settings, but I'm not sure if this has anything to do with it?
Can anyone point out where I'm going wrong?
Thanks in advance!