Retrieve phone number with the help of id in facebook - android

I am able to retrieve most of the information with the help of id in facebook.Is it possible to retrieve phone number of friends,because Json Array generated after parsing id is not giving the phone number.If it is, then how?

Yes it is possible to retrieve the friends phone number once they come to your app and grant you the permissions. To get that friend to come to the app, you need to make your app so cool that each user will want to have all their friends using the app too. It's a hard challenge, but it can be done, take a look at FarmVille, etc for some inspiration .

Related

Can I allow installing app only on certain verified devices?

I want to restrict my application to install only allowed device. That is while installing the app I want to fetch the device information like imei number. Then I want to check the imei number if it is valid or not using my restored database of imei.
Is that possible?
Its not possible to prevent App installation, if one has the APK file but
Through smart coding you can achieve it
1) Anyways you will get the IMEI numbers of the users phone so programatically you can check the condition on landing/splash page if IMEI==USER_IMEI_NUMBER then only he/she can able to see its main page else he will not get authority to enter into main page but for that you need to create APK file for each device
2) If you dont know how many users will use your app then you can do remote database in that database you can save new users IMEI number and in splash/landing page you can check through webservice that IMEI==USERS_IMEI_NUMBER (from remote database) then he/she can use your app but off course for that you need to mention internet permission in it and user must have valid internet connection if you dont want user to check it identity/IMEI number each time then you can validate user at once and you can save its result in shared preferrences and you can give access to user everytime without hiting webservice for validation
hope this suggestion may help you happy coding :)

Android facebook SDK 4.x getting user email without JSON

I want to ask how could I get user's which is logged into app email as string value? I have only seen tutorials how to get it using json and then send it to web service which I don't need. Maybe someone could show me the simple way of getting user email?
The Graph API always returns JSON. So, no, I don't think that this is possible. The Android SDK provides convenience classes, so I don't really see a big effort using those. You can use JSONObject.get("email") to retrieve to value of the email property I guess.
See
https://developers.facebook.com/docs/android/graph#userdata
http://developer.android.com/reference/org/json/JSONObject.html#get(java.lang.String)

handling different type of users with parse.com API in android

I am new in android. I am developing android app and using http://parse.com API. I want to implement two types of user Student and Company. Basic signup form has the same fields. Later, I want to add additional information related to the user and specific for each type. Now, problem how to save user information for different type of users?
Make a column of userType in parse user table to differentiate user category.
And save user type during sign up and it's information.
I am also using this method because my application also has three end user.
This is working properly for me.
Hope this may helpful for you.

How to display facebook Online friends in my android application?

I want to display my facebook online friends and offline friends suppurate.But i don't know how to display.But I am getting all my facebook friends into list in my application.
Any one please help me.....How to display online and offline friends suppurate.
First - use the fb api. get the friends.
Second - show the list in beautiful Ui component or what ever.
So I understand that you have done the first, right?
If so, then what stops you to make some container and push back dynamically to it labels for example. After this you can try some more beautiful solution how I sad..
try explain more what you've done... Be more specific, please. :)
EDIT 1
Here you are: https://developers.facebook.com/docs/reference/fql/user
Use that:
online_presence
The user's Facebook Chat status. Returns a string, one of active,
idle, offline, or error (when Facebook can't determine presence
information on the server side). The query does not return the user's
Facebook Chat status when that information is restricted for privacy
reasons
EDIT 2
May be you need a loop all your friends and for each of them execute the query
SELECT online_presence FROM user WHERE username = the_friend_from_list
This is a pseudocode but I'm sure you can handle it. :)

android check if a contact installed an app android (like whatsapp)

I want to let my app scan the users contactlist , and display the name of the contacts who also installed the app.
I have no idea where to begin with this . so if someone could help me getting started , that would be apreciated.
grtz
You will need to research ContentResolver because you will have to query the database containing the contacts. To do these queries, you will need the URI and column/header names for contacts db which can be found in the Contacts class.
You will also need users to register that they have your app on your own servers and the registration will need a piece of information about the user that other users would have in their contacts (the users phone number, email address, etc).
You will then need to query a few users at a time from the users contacts for this piece of information (using the ContentResolver and Contacts class), pass it to your server (as text) where it will check if they are registered, then send a message back to initial user (and possibly the match) that you found a match.
That's where you should start, and end :)
Note, you will need these permissions in the Manifest file:
android.permission.INTERNET
android.permission.READ_CONTACTS
First of all, welcome to StackOverflow. StackOverflow is for programming questions. As is such, a post asking for help should always provide a description of what you have already tried. If you haven't tried anything yet, I highly encourage you to try something, and post when you encounter a problem.
As your question stands now, we don't know what the problem is. Are you having problems scanning a contact list? Or are you having problems trying to figure out if another user has installed the app?
That being said, you will have to maintain a database for your app containing a list of people who have installed your app. When your app is launched on one device, do whatever you need to do to register the user in your database. Due to the nature of a "contact," one person's phone may only have their phone number, email address, or even just a name. This is of course something you will have to deal with in your implementation.

Categories

Resources