How to get facebook friends recent activities - android

I want to get the recent activities of my facebook friends per day basis. I mean to say can i get my facebook friends wall? Thanks.

yes you can... all you have to do is query the graph api like this :
https://graph.facebook.com/{user_id}/feed
You will have to request the read_stream permission from the user in order to gain access to this data.
Here is some information about permissions.
Here is some information about using the graph api.
EDIT:
Apologies, you can not retrieve information from a friends feed. What you will have to do is request offline access from your users and only then will you be able to retrieve data from that users feed in order to give it to another user.

I never used the Below solution,But I am sure there's Way to do this using FQL
You will have to write a Query to GRAPH API and Using HTTP GET and you will get the data in JSON format,something like this not Completely sure but check the link FQL
https://graph.facebook.com/fql?q=SELECT+activities+FROM+user+WHERE+uid1=Friend'sID&access_token
from the USER table.
Hope you will get the solution,And If you try let my know your experience.

Related

How can I get same id in friends & tagable friends Facebook api?

We are working on an Application in which we are getting friends data using me/friends & me/taggable_friends apis.
For both of the apis we are getting different id of user. In me/taggable_friends api, It is returning different id of particular user.
Please advice how to manage this situation.
Thanks.
What you get from the taggable_friends endpoint is not an id, but a token only – and it is short-lived.
The only purpose for which you are supposed to use it, is tagging friends in OG stories. For that, you are supposed to provide the user with a UI where they can select the friends they want to tag.
You are not allowed to try and use the data you get from that endpoint for any other purpose.

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)

GraphUser object returns null "getUserName" while fetching friends from facebook in Android

In my android application i want to fetch my facebook friends and for that i am using facebook-android-sdk-3.7. I referred FriendPickerSample which is provided by facebook-android-sdk itself. Here, it returns friendlist as a list of GraphUser. Now, i want to fetch username of all friends but the problem is that it doesn't provide username of friendlist. It provides all other personal information of friends except userName.So what should i do to get username of friends? Please suggest any solution for that. Thank you.
I'm not sure what's the code inside that sample which is fetching the user details, so I can not suggest you some changes to fetch the username.
Anyways, that sample must be providing you the user_id. So, you can make this call to get the username of that friend-
/{user-id}?fields=username
Demo

How to fetch basic data of friends in facebook integration android

I am integrating facebook sdk in android.
Currently I completed with
Login
Post message on wall
User information
user friend list
Now I want users friends basic information like (Name, email,picture,birthday,gender, location etc)..
I have friend list and now on list item click i want friends basic detail.
Please help me for this...
Thanks in advance.
You'll get it in the same you you got the details of the user. Just like this-
/<friend-id>?fields=....
Of course, you need to ask for the permissions to get some of the details. List of permissions for fetching the friends data(other than the basic details)-
Another thing- there's no way you can fetch the friends email.

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

Categories

Resources