Getting google username from userid - android

I use Android market api
in order to fetch information from google playstore. The api returns a user id corresponding to each reviewer for an application. Sample user id's returned by the api would look like this:
cid-lg:AOqpTOGMFCTbFodkU6yTr_DttkugfrgfI0-q6a008jeD67cKE1xoDv_bT8gjjILcPcxOOZ0m3atfEDl9O0RLiYM
cid-gp:AOqpTOGCrH6yXqvnrDmTZ6C1gJrLBYioEemkZq4nflx-e1c7Eg6coh1c8q_mhtJB07-fUBps0a-AxTHMBLuDOGA
cid-gp:AOqpTOHUIW7EByEinUUKXzZeHRKC3UvbAXnGtuaVE2i4rIUXMw-zfD3WsXr4Hl25fCPSKx4ix6GXT-gt9NM_9P0
These are the user id's for 3 different reviewers for a single application.
Is there a way out by which I can get the google username corresponding to these user id's ?

Related

Google Pay API - Insert a Pass to the Google Pay App without the JWT

As the title suggest, I need help regarding the insertion of a Pass object into the Google Pay App (Android App) without the need for the user to go through the received JWT on the custom client App.
The scenario which I am following is the one based on the description on the Google site. In this approach, a class and an object are created and inserted on the custom Server side based on the request from the Android Client App. As a response, a JWT token created using the Google Pay API is returned on which the user needs to click and link itself with the Google Pay App (hence, to further click "Save" to actually save the pass).
Is it possible to directly insert the object and link it with the Google Pay account without receiving first the JWT and requiring the user to handle it?
The idea is to process this in the background when the local ticket is created and to free the user from always having to save each individual Ticket.
It is not possible, the user has to explicitly save the pass. However you can group event tickets as per the docs and have multiple tickets saved in one button.

How to retrieve the canonical user id for facebook login

I am creating an android app which needs to be converted a web site to mobile app. On website Users can login using facebook. So I integrated facebook login in android app successfully and login function works(only for recently signed up accounts).
I checked accounts which signed up about 1 year ago using web site, but the login failed on mobile app.
The reason I think is, earlier accounts uses canonical facebook user ids(before graph api v2) and recent accounts(after graph api v2) use the app scoped user ids.read the first answer
Note: Users are stored using user id in the backend. So the user id i'm getting from app has to be matched with the stored id(which is canonical user id) for successful login.
The problem is how to get that canonical user id for earlier accounts?
I found that to get the user ids for different apps facebook has introduced this business mapping API . To use this API I need to create a new business and need to define both web app and android app under the same business then I can retrieve both ids separately.
If someone use this business mapping API, can I retrieve that canonical user id from this API call?
or if someone suggest a way to solve this login problem for earlier accounts, it will be really appreciated.
Even if your App was created with v1.0 of the Graph API, you will still get the "old" (real) ID of users with /me. There is no need to map anything, except if you want to match users between different Apps. That´s what the Business Mapping API is for.

Using Linked API to login to my app

I have an app that's using Linkedin api. I can successfully log a user in to linkedin and retrieve info, but I would like to save something from their profile so they have a unique ID in my rails api Users table. I've read the userID from linkedin can possibly change if the API key for the app changes for any reason. Is using that id still the best way of registering a new user in my app or is some other unique private info more suitable?
You are correct that the member id value is unique to the user + application. Do you plan on changing your application key? If not, then that should be the id that you use. I can't think of a good reason that you would typically change your application key.

How can I get user info from a google account?

I want to allow my app users to log on/register with a google account. I need to retrieve the following about a user
A unique id, first name, last name, email
Is it possible in android or do I have to use one of goooles services like picasa api to get this information about a user?
Login with Google+
https://developers.google.com/+/mobile/android/sign-in
Retrieve profile info
https://developers.google.com/+/mobile/android/people

Find user's Facebook Friends that also use my Android App?

My app has an instant messaging feature. So it has a contact list.. I want to populate the contact list to help get my user started with some friends..
After asking permission I will:
1) Search the local contact database, send the phone numbers to my server and check for other accounts using my application that have the same phone number.
2) Ask them if they want to also import their facebook friends. At which point I suppose I will ask them for their username and password for facebook, log in to the Graph API and request their list of friends..
My question is, once I am iterating the list of friends from my user's facebook friends list, how can I link their facebook friend ID (or whatever identifier Facebook gives me) to some other ID in my app?
Will I see the email of all my friends users (after research, it looks like not)? Will I just get a numeric Facebook ID? If so, then how am I to harvest facebook IDs from all my users that have linked their account to facebook in my app?
I suspect this feature has been implement by other third party developers. So I'm looking for the strategy to identify and link my app users, to facebook accounts, and then iterate my app users friends list to find common users.
The question I am answering from a user perspective "Which of my facebook friends are already using this app, named XYZ on android"
You can store a user's Facebook ID alongside their other user information for your app, then match on the retrieved IDs from a Graph API /friends call. This way, you'll be able to see which friends have also linked the app to their Facebook account. You won't be able to fetch email addresses for a user's friends using the API.

Categories

Resources