How to display facebook Online friends in my android application? - android

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. :)

Related

My application server side

I finished developing my client side application in Android.
I want to create a sign-up page and Page Login.
When the user login my app he selects several categories.
I want to show all the categories that users select a certain page. Please give me some tips for this. Do I need server side for this? If I do, where am I supposed to start? Thanks for help and sorry for weak English.
Unless you need to get the categories from the server, then this seems like something on the client side. In HTML, you can show a bunch of categories with < select >, which you can see here: http://www.w3schools.com/tags/tag_option.asp
If you're doing it in an Android app, you can use Spinner.

How to integrate friend list feature in an Android App?

I would like to have a friend list feature in my App. The idea is to select any contact from your contact list and then that contact would be sent an SMS from the App(via Server), requesting him to click on the link to accept the friend request, if he is already on the App. If he is not on the App, the SMS would send him a download link. How can I achieve this? Any help would be highly appreciated.
EDIT:
So far, when I select the contact, it gets added in my friend list, with an "!" mark that the request has not been approved at the other end. The other guy gets an SMS as well from the App(via Server) to accept the request by clicking on the link. Now when the other guy, clicks on the link(just a demo link as of now), how do I make him accept the request? Any suggestions would be highly appreciated.
You have nearly completed the job at hand.
Here is what you can do to finish it.You will need to maintain a mapping of which number sent which other number a link on the server. I have not understood how a single link for all requests is going to suffice what you need to do(else you will need a way to generate unique links and handle what happens when each is clicked on!). I dont think that is possible. The user onclick on the link could be redirected to new activity which will pull friend-requests from the server from the mapping availabe. The user could accept or reject the requests here. You see a single link will fail to provide functionality of multiple requests the user gets. Once the second user has one this, you can notify the first user of the same(maybe via GCM or by polling from the device(not efficient!)). I hope my interpretation of the task at hand was right.

Facebook SDK for Android: Trying to get a notification when one "likes/comment" the post made by my Android app

I'm fairly new to Facebook SFD for Android.
What I'm trying to achieve is an Android app that uses facebook login, post to the user timeline and gets notified whenever one is commenting or liking that post.
I went thru Facebook tutorials for login and for Publish to Feed.
All went well.
Now I'm struggling with the last part. I don't see how to be notified whenever there is a like or comments. I browsed the web and stackoverflow forum without any success. I'm guessing that there is a mechanism to be notified by Facebook and that I don't have to start a process just to monitor the post...
Anyone could give me a hint on the API to use?
I'm currently looking at "Creating Object Types" section Associating Actions with Object Creation (https://developers.facebook.com/docs/opengraph/creating-object-types) but it looks like this describes how to do for facebook web app, and not for android app.
EDIT
I've found this https://developers.facebook.com/docs/graph-api/real-time-updates/ but not quite sure how to "translate" this into Android coding.
If anyone could help me with this, it would be greatly appreciated.
I guess you have to create a page in php that will handle the responses from Facebook, it starts with a
GET response from Facebook that you retrieve with $_GET["name"] in php, and you have to send back a confirmation to Facebook to confirm that the connection works, and Facebook will send you the answer you want via
a POST request ( $_POST["name"] ) (with a json object, containing the informations about the user in object for example, and the different updates in entry).
You can put all these informations in a database, and when the user start your application, you can automatically connect him to a php script that check if the database has new informations for him.
(specifying who he is, with a user variable that he keeps in the memory of his device, and then you ask for informations from the database about this user). I haven't tested, but it should work.

how to get/fetch our facebook group list (android sdk)

I integrate my android app with facebook. I want to fetch (then display) list of my facebook group on my app. Maybe anyone have a tutorial to do that?
What you are looking for is the following end point
/me/groups
Which displays the list of the groups the User has subscribed to. But to get the data from the end point you will be required to obtain the user_groups permission to read the User's group.
You can see the documentation at:
https://developers.facebook.com/docs/reference/api/group/

Android: how to keep the login username stored in the phone as user sending the data to the database server

I've been doing alot of searching around the website but not even sure if i got all the keywords correctly.
I've found this link but I needed more coding samples.
How to keep the session of user login?
I would like more sample coding on keeping the user's info when logged in. As that user sends the data to the server it will identify that user sent that data.
For example, I login as 9999. I send the data 123456789 as a book number to the database server.
the database will show
user-9999 book number 123456789
Another thing I need as sample coding for this similar project is how to input a code to completely logout. As user's cant log out and only their supervisor who knows the code can approve and logout for them by putting in the numbers.
Thanks
Merrill
(I'd post this in a comment, but my account doesn't yet have adequate commenting permissions.)
Are you strictly trying to figure out http session management within the Android app, or are you also trying to figure out session management in a server-side application?

Categories

Resources