Working with multiple facebook apps user id v1.0 and v2.0 - facebook-oauth

We're using multiple Facebook apps for our product, in V1.0 we used to get the same user id for all apps. We save accounts collection in our db in which we save Facebook id in and creating new accounts for users in which we don't have their FB id already.
Last week we've created a new app, when we started to use it we found out that we're getting a different id for existing users and we're creating a new account for them in our db. (This happened because the new app was created on v2.0 as explained here - https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_user_ids)
I read that we can use business manager in order to define all apps and get all the user id for all apps under the same business (https://developers.facebook.com/docs/apps/for-business), but I couldn't find how can I connect these ids to the original id.
I saw a hack that once I have app_scoped_id, I can make a another FB api call to get the original id (Get Facebook User ID from app-scoped User ID) but this means I keep managing the FB ids on our db, is this a good approach? or should I move on to manage the app scope ids? how can I get them for my V1.0 apps before this transition takes place? can I migrate my data in db (when having FB global ids only)? or do I must have a user access token in order to get this info?
Thanks!
Ilana

Related

How to get the authorized user's organization detail via LinkedIn API

The document shows that the r_fullprofile member permission is needed to get the user's organizations field.
I can not find in the document way to get the r_fullprofile permission.
I have already created new developer application.
Question:
How to get permission to fetch user's organization data via API call.
As per my understanding, I have only seen basic and lite profile member permissions.
Currently LinkedIn provides only 3 type of products, which are given below
and the scopes are provided based on these products.
For you requirement, you can opt for the marketing developer program, which will give the permission r_organization_admin
and using this permission, you can use following endpoint to get user's organizations along with roles.
We also did similar things in our app, where we list down user's organizations and user can select them to share their posts from our app.

Getting the correct Google client ID for Chrome users with multiple accounts

I'm trying to get the Google Client Id (found under https://plus.google.com/me) of a user corresponding to the account he's currently connected with.
Explanation: when connecting with your gmail account on Chrome, the result of the code given here (https://developers.google.com/+/web/people/) gives the user's client ID that I need to use the Google Payment API.
The problem is if the user has multiple accounts connected on Chrome.
Example: Our user has an email account for work (WEmail) and a personal email account (PEmail). He first connects to chrome using his WEmail. Then adds his PEmail to the list of Chrome connected accounts. Then our user wishes to make a payment on an extension he has installed, with his PEmail.
The issue here is that to process such a payment you need the google client ID of that user, and when you fetch it, you will get the one of the first connected account (WEmail) and not the one of the current used account (PEmail). Which makes it impossible to process the payment since you might not be serving the right account.
Is there any way to get all the currently used ids of a user or jsut the currently used id?
If not, are there plans to integrate such a solution in the short term?
Thanks for your help.

What is the intended use case for app auth and app users?

I am trying to understand what is the intended use case for app auth and app users. Im basically thinking about building an app that would use Box to store data of users that would subscribe to our service. Our service would allow each user to access and view their data.
If I have an account that basically owns the data of all the subscribed users, can I use the enterprise access token as a base for authentication while using the user account token to restrict the user to only viewing the data from their specific sub directory. Or do I have to have a unique account with its own api key for every user?
I hope this makes sense. Any assistance would be appreciated.
Thanks.
App Auth and App Users -- which is officially called Box Platform -- is essentially a white-labeled version of Box. I think of it this way: "Box" as we know it is software-as-a-service. It offers a web app, mobile apps, and all the trimmings. Box Platform is the platform layer upon which the SaaS is built, providing API-based management of users/content/comments/collaborations/etc. With Box Platform you have a walled garden in which you can build apps that leverage all the features of the APIs, but are not otherwise "Box apps."
I'm basically thinking about building an app that would use Box to store data of users that would subscribe to our service. Our service would allow each user to access and view their data.
This is an appropriate use case. With Box Platform you will be the owner and administrator of a Box enterprise and all the accounts and data contained within.
If I have an account that basically owns the data of all the subscribed users, can I use the enterprise access token as a base for authentication while using the user account token to restrict the user to only viewing the data from their specific sub directory. Or do I have to have a unique account with its own api key for every user?
I think it's generally cleanest to create unique accounts for each user as opposed to giving users a special subdirectory in the admin account. From there you can use the App Auth workflow to get an access token specific to that user.

Box.Net users-on-behalf-of-enterprise-user working

In Box developer document they ask to contact them with the API key generated.
Reference:
http://developers.box.com/docs/#users-on-behalf-of-enterprise-user
Is there is any api(Java) to get the other users mail box with the admin credential.
The primary purpose of "on-behalf-of" is to make calls on behalf of your company's users as an administrator. A great use case is if you'd like to prepopulate your new hire's account with a set of folders before they start on day 1.
In order to get the listing of enterprise users in your account, you would use the following API call if you are an administrator: http://developers.box.com/docs/#users-get-all-the-users-in-an-enterprise. This is currently not built into the Java SDK, but it is open source if you want to submit a pull request to it to add the functionality.

ios/Android targeted push notifications in AIR app

I was wondering if it is possible to have multiple custom push notifications setup in a single AIR App.
What I am trying to do is allow users to setup custom alerts based on information they would like to receive for example say user 1 would like to know when new actions or drama movies are released on DVD, user 2 would like to know when new comedies are released, user 3 would like to know when any new movie is released.
This is a simple example and there are possibly 1000's of options (postcode/zip information).
Thanks
Technically, there's nothing that wouldn't allow you to do this.
The implementation is mostly backend related though, let me just quickly draft a design for that here;
The user's device registers for push notifications at your backend service.
Your service takes the user's id stores in a DB and passes the device token to the corresponding push notification server.
Once the registration is completed, the user selects what items he'd like to get notified of (naturally your backend service has to know this information as well to store it in the DB).
As soon as a new action movie (or whatever kind of information the user registered for) is available, your service looks in the DB what users registered for that kind of movies and sends a message via push.
So a simple database and some server side scripting will get you going.