Restrict number of application users in Facebook app - facebook

Is it possible to limit the total number of user installs of a Facebook application using Facebook API or configuration?
Obviously the beauty of Facebook's platform is the virality. However, the greater the number of installations the more server demands grow etc.
So when building applications for clients with fixed budgets (think marketing activity / capping adverts per day based on spend) - is there a way to restrict the total number of users that Facebook allows to install an application?
Specifically talking here about building Facebook Games.

No, there is no build-in mechanism for that – because usually developers are happy about an ever-growing user base.
A canvas app is not really “installed”, users just connect to it. And this is the only point where you could try to handle this – once a user has connected to your app, you can recognize that (via the signed_request parameter or using the JS SDK) when he visits your app next time. So from a certain point on you could just not ask users for login any more (FB.login, redirecting them to the Auth dialog, …).
Obviously your initial app page will still be called, but any stuff you do afterwards with connected users and their data (if that’s what strains your little server most) you could just stop for users that are not already connected. Big downside of this is of course, if a user removes your app (willingly or by accident), they will find no way to re-connect with your app again.
Maybe you should consider hosting your app on a platform like Heroku – it’s free, and I think they will provide you with enough server power to handle your app growing larger than initially planned/expected.

Related

Facebook connect service for my customers without appid

I have more than few clients that would like to add facebook connect to their landing pages (managed by me). They are too many and not enough tech-savvy to manually create ad appid for each of them.
So my only solution is to usa my own appid to add facebook connect to all my clients websites, but as far as I know, Facebook doesn't allow to simply use the same appid on any domain.
How can I solve this? I can't find any documentation to solve my issue. Does anyone have a direction for me?
This has been discussed a couple o’ times before already – but I mostly commented on earlier questions, so let me write the whole thing up as a proper answer, for future reference.
[paraphrased] Multiple-client Facebook login via one single app id
Does anyone have a direction for me?
You probably rather don’t want to do that.
It is not really possible to run one simple app one multiple different domains.
As a workaround for only a few domains, people used to specify different domains for the different platforms – Website, Page Tab or Canvas App, plus Mobile alternative for Canvas – without actually using any of those platforms besides Website, which made the app usable on multiple domains as a website app. But since Facebook introduced their login/permission review process¹, you can’t do that any more – they expect you to present actual functionality on all platforms you have configured in your app.
You can kind-off use one single app for login on multiple domains – if you are willing to use only the server-side login flow, and to redirect users to one “main” domain (that gets specified as the app domain in the app settings) to login, and then from there back to the origin domain.
But this has several drawbacks:
It’s not what you’d call a “white label” solution. If your clients expect it to look as if users where logging in via “their” app, it should stay on their domain. Individual branding, in regard to stuff such as app name, app logo that shows in the login dialog, etc., would also not be possible. Additionally, app attribution – the link that shows up under content shared/posted via the app – would only link users back to the main domain, and not to your customer’s.
You would not be able to use the JS SDK for client-side API requests, or even just to embed it to render any of the FB social plugins that require an app id – the SDK checks what domain it is “running on”, and can not be tricked to accept a domain that is not specified in the app settings.
There could be privacy issues. An over-exaggerated example: Just because I as the app user decided to share my photos or videos I have on Facebook with your customer Our-Holy-Mother-of-Christ-Bakery.com, does not necessarily mean I want to share them with your other customer, amateurs-doing-all-kinds-of-nasty-stuff.xxx as well – but if they shared an app id for login purposes, I automatically would. Have fun writin’ the Privacy Policy (which is mandatory if you use FB login functionality, and FB also automatically checks if your app has got one) for that scenario ;-)
Finally, and most importantly: All your customers would be “sitting in the same boat.” If one of them, or in turn their website users, would publish spam via your app id, so that Facebook blocks it, login would not work any more for all of your customer’s websites. And if you decide only then, that setting up an individual app for each of your customers would be the better way to go, they would not be able to recognize their existing users any more, because of user ids being app-scoped since API v2.0 was introduced – so if users logged into this new app, that app would see a totally different user id. (And to rely on an email address as an identifier is risky, too, because you will not get one from the API for every user; for example if they registered using their mobile device.)
Edit: Plus, app/domain insights, as luschn mentioned in his answer.
¹ Yes, the review process has made it more laborious to set up multiple apps for multiple clients. But for apps that do the same stuff/use the same permissions in the same manner, you can refer to an earlier successfully reviewed app id to speed up the process a little. Also, screenshots of how f.e. posts made via the app look on timeline, and what UI components are used, as well as screencasts that you include in your submission could probably be used with little to no alteration.
Apps are not meant be used on several different domains, you will have to create a new App for each domain, i´m afraid. You can use the different platforms in the App settings to use different domains, but there are only a few so it´s pointless. Just create some screenshots and a tutorial for your clients, that´s how it is usually done.
Btw, it would be weird to authorize an App on a website, and the same App would allow you to be authorized on all other client websites. Also, insights are per App, so your clients may want to see their own insights and not the global insights of all domains together.
Many is not defined but i think for being a smart developer you need to create new app_ids for every project you need to use facebook connect. Just my opinion. It also allows you to monitor alot of stuff.

Facebook sharing for multi tenant web application

I have a multi-tenant web application and I'm wondering which would be the best way to let all the tenant publish their content on the feed of their facebook page (if they have one of course).
There's no public page/link to share so all the shared content has to go straight to the feed (using JS with FB.api feed + photos...). I am wondering which is the most proper way to accomplish this task: having one FB app for every tenant, or using the same FB app for all the different pages, or some other way...
Any suggestions?
I would set this up using a Facebook app for each tenant. This would be forward thinking if you ever want to do further Facebook integration. This also protects your tenants from eachother's behavior. If one tenant violates Facebook policy (There's a lot more of it nowadays) and gets their app locked or anything similar then it won't affect your other tenants ability to interact with Facebook. Also if your application is a white label app then giving each tenant their own Facebook app is almost necessary. Of course each clients having their own app does incur maintenance costs. Whenever Facebook decides to deprecate functionality or implement new features that require their Migration strategies, you'll have to manage each of the apps individually at developers.facebook.com, and depending on how many tenants you have and which features you've integrated with, that can be become tedious since there's no way of automating confirmation of compliance for all of the apps set up. Also now there's a review process for a lot of integration features. That review process would be required for each of the apps individually depending on the features implemented.

Facebook Dummy Accounts For User Interaction Testing Being Banned

I am software tester working on outsourced projects for many clients.
Frequently, I am required to test Facebook apps just before they go live. Often, the content of the app requires several interactions with other Facebook friends, including pulling of tagged photos and retrieving a user's info.
Most advice suggests that I should be using Facebook test accounts, created by a developer of a specific app. However, due to the complexity of some of the requirements in order to fully test certain apps, a dummy account - pre-filled with 'real' information is much more practical to use. It is clear that if we were to add all of this detail to Facebook test accounts for every new project, we would never get any time to actually test the app.
My company has approximately 20-30 dummy user accounts on Facebook, all of which have a good level of detail including personal info, photos, friend networks etc. These are perfect for testing as they are normal Facebook accounts. We always set option to private to prevent any sensitive material from being seen by the general public.
Over the last moth or more, our dummy user accounts are being systematically wiped out where Facebook is blocking them. Clearly, we cannot re-instate these accounts as we have no ID for the 'dummy' users.
Our aim is to aid the developers to improve the quality of their Facebook apps, and so has no detrimental effect on Facebook as a company or a brand.
Is there any way to achieve our requirements without the constant battle to maintain our dummy accounts?
Login to facebook. Then use /whitehat in the URL. On the left hand side you will get an option to create test accounts.
Test users are the only way to do this without violating Facebook's terms of service.
You can use multiple apps with a Test User, assuming you're not deleting and recreating them between test runs

How to share from iphone app to any windows phone 7 app?

Let's say I have app on iPhone and Windows Phone 7. How to share (ex. Note) between my both apps, regardless any platform.
Update
Guess this question is very broad, my bad.
Be more specific, I want the user to go through his contact list and share through my app. How do I identify if the other user installed my app? and what platform he/she using?
Using the contact list isn't a good way to "share" in this regard.
You're asking two questions here:
How to build a system to share data between two mobile clients, irrespective of platform?
How to best enable users to find their friends to share data?
Let's start with the 2nd question.
I would leverage services like Twitter and Facebook and have your app connect with your users facebook account. This is a well known approach, and avoids having to roll your own account system.
With facebook as an example:
Facebook connect, you can get the facebookID of your user, as well as their friends facebookID. You'll need a backend webservice which you can query users by fbID.
When a user opts to use their facebook account, store their FacebookID on your backend service. Then using facebook's api's get a list of their friends facebookID's. Your app will lookup each ID using your backend service, and if it finds one, then you know that friend has also installed the app, and connected it to facebook.
So if Alice installed your app, connects to facebook, and she is friends with Bob, who also has installed your app, your back end service would return that Bob's facebookID is known to your app, and thus the two of them can share to each other using some protocol that you design.
If their friend's ID isn't known to your system, I would send them a facebook message, or post on thier wall with a restful link that invites them to check out the note you want to share on the web, and place the link to the app on the same page.
Due to the high level of your question, this answer is a bit of a 20,000ft view, and assumes you know how to build a web service.
If you want to see a great example of an app that makes use Facebook and or Twitter to find friends who also use the same app, I recommend checking out Groupme. It's free, and available for WP7, iPhone, and Android. It's a group SMS app, and uses your contact list, facebook, and twitter, to setup friends.
For the first question, you'll need to make use of a backend webservice. User would elect to share either in-app, or by posting to their facebook, with a weblink. In-app sharing, I would use an inbox approach. A user posts a message to their friend, and it gets stored in a queue. The app periodically checks the users queue to see if any new "shares" have been posted. If so, get that data, and present it to the user. Your back end service should also take advantage of newer app concepts like push notifications, because thats what users expect.
I would suggest using a web service such as Parse. This will allow you to focus on your app development and not worry about server coding.
Currently they do not have a Windows Phone 7 SDK but it is just a matter of making the REST requests manually to the service.

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.