Get Facebook status and replies for those status - facebook

I am trying to get facebook status and replies for those status, so what I didn't find anything other than Status messages: [a link] https://graph.facebook.com/367501354973 (A status message from Bret). Looks like this require userid but how can I get user id's of my friends. If I get my friends can I get the status of friends of my friends. I have been searching every possible place to find an answer on getting facebook status along with the replies but so for no luck. It would be great if there is a webcrawler for something like this.

Check this
http://developers.facebook.com/docs/reference/api/status/
You can also use below facebook Graph API Explorer tool to test
http://developers.facebook.com/tools/explorer/?method=GET&path=580490479
You can get your friend's ID by below
https://graph.facebook.com/me/friends?access_token=
You can get updated of Your friends by
https://graph.facebook.com/580490479/feed
and for Posting check below
http://developers.facebook.com/docs/reference/api/post/
--- Samir

Related

get all the friends and all mutual friends with graph-api

I'm trying to get all friends of a user, and mutual friends. I'm using Graph API V2.4.
first I used ... /me/friends but i discover this method return only friends with use my app. I read that is used .../me/taggable_friends and returned all friends, but not return id friend, return other id.
I read about all_mutual_friends but I cannot use this method because i dont have friend ids.
Anybody know any solution ?
Unfortunately there's no workaround for this , you can't access a user's friends list .
However if you can access his news feed you can iterate over his posts and get the json array of the likes of each one and combine them , by doing this you at least have some of the user's friends IDs .
The request goes something like this
Get /{post id}?fields=likes

How can I get user's facebook interests?

I am trying to get interest from Facebook Api but empty array is returned.
I have searched for other issues like:
How to get user Interests? (//stackoverflow.com/questions/12422714/how-to-get-user-interests)
How can I get the interests of my friend through facebook api?(//stackoverflow.com/questions/6587373/how-can-i-get-the-interests-of-my-friend-through-facebook-api)
In "Graph API Reference" (developers.facebook.com/docs/graph-api/reference/v2.1) is defined a full list of nodes. If I click in 'user' and click in 'interest' I am redirected to "/{user-id}/interests" (//developers.facebook.com/docs/graph-api/reference/v2.1/user/interests) description. In this description are defined serveral points:
Endpoint: GET /user/interests
Permission: user_interests
Descrption: The interests listed on someone's profile under "Likes > Interests" (//www.facebook.com/me/likes_interests).
I am using Graph API Explorer for to test. I have used all api versions (from unversioned to v2.1).
If I get a valid access token with aproppiated permission and I do a request to endpoint "/me" I have a successfully response with data.
If I do a request to endpoint "/me/interests" I have a empty response:
{
"data": [
]
}
My user in Facebook is following a list of interest for example: stackoverflow group.
If I do a request to movies or books the response are empty too. But if I do a "like action" in a book or movie and try again I have a successfull response. If I try again with "/me/interest" response is empty yet.
I believe that I do not understand concept of "interest" or something is wrong and I can not see it.
Which is the way for to recovery the interests of an user?
The interests are specified in the Profile section, and not via Like actions! The list you linked is not an interest either.
Books and Movies can be requested with the user_likes permission, so if you didn't request that the response will be empty as well.

Can I access to unseen facebook notifications?

I'm using Facebook Graph Api and FQL.
I would like to access to unseen facebook notifications. Is it possible ?
I have tried to do something like this :
"me/notifications". I can get "unseen_count" in the summary block but how can I have the id of each "unseen" notification in order to find them ?
I know the "unread" but not the "unseen"...
Thansk in advance ;-)
If you use FQL, you can easily get unread notifications:
Try running the following FQL query in your code or test it here:
SELECT app_id, body_html, body_text, href FROM notification WHERE is_unread = 1 AND recipient_id = me()
You will need to ask for the manage_notifications permission for the call to work.

Not Retrieving Status for Some users FQL

I am unable to retrieve Status using FQL for Some Users...for Most of User it is working fine.. but for Some Users not ...
FYI Message is Public and Visible to all friends.
I unable to find what is the problem...Below is The Query..
SELECT status_id, message FROM status WHERE uid in (XXXXX,XXXXX)
User Must Need to Allow My Status Update under Privacy Settings>> How You Connect>> How people bring your info to apps they use

Facebook Graph API - get friends info

I'm trying to figure out how to get users friends information using either Graph API or FQL
Just for testing I would like to get my friends education_histroy.
To do that I created a test app, requested extended permissions using
scope=offline_access,manage_friendlists,friends_work_history,
friends_education_history,friends_about_me
and got access token to play with the API.
It works great when I query for current user using /me. But it returns nothing for my friends.
I was assuming that if I request, let's say friends_work_history, that extra field (work_history) will appear inside friend's object, when I query by friend's id:
https://graph.facebook.com/FRIEND_ID&access_token=TOKEN
But all I see is basic info about that user (friend).
Then I tried to request that field specifically:
https://graph.facebook.com/FRIEND_ID?fields=work&access_token=TOKEN
With no luck again. Returns just friend's id..
I tried to access that information with FQL:
https://api.facebook.com/method/fql.query?query=select+work_history+from+user+where+uid+in+(FRIEND_ID)&access_token=TOKEN
Returns work_history = TRUE instead of array. And that friend definitely has work history specified.
Can someone help me to understand how to get friends info using my app and extended permissions?
Graph API is the smart choice in most cases. To retrieve your friend information you need to collect some extended permissions from the user first. Then you can retrieve a lot more information other than the basic ones.
Following is a list of extended permissions related to friends different kind of information
friends_about_me
friends_activities
friends_birthday
friends_checkins
friends_education_history
friends_events
friends_games_activity
friends_groups
friends_hometown
friends_interests
friends_likes
friends_location
friends_notes
friends_online_presence
friends_photo_video_tags
friends_photos
friends_relationship_details
friends_relationships
friends_religion_politics
friends_status
friends_subscriptions
friends_videos
friends_website
friends_work_history
Hope it helps :)
I've been wrestling with this all day myself and I believe I have figured it out, nowhere in facebook documentation (that I have found) is this clear. And I don't believe the other answers actually answered your question, it looks like you requested permissions correctly. Anyway, to request the information you are looking for, ping the api like this:
https://graph.facebook.com/userid/friends?fields=work&access_token=ACCESSTOKENHERE
This will return you all the friends' info in one long JSON response.
It is a little confusing because the permissions you are asking for are not the same thing you need to query the API.
The query above will return the friends' ids with work history. You can add commas to the fields parameter to include additional info like name, but then the API calls/responses end up taking a long time.
http://developers.facebook.com/docs/reference/api/user/
you can get all the fields mentioned here .To get work you need to have user_work_history or friends_work_history permission
in the link it is mentioned what permissions to obtain before you get the info and another thing that user has to allow your application,this will make your app to get the informations.
From this answer to another question: a call to 'me/friends?fields=work' worked for me!
I'd suggest that you go to http://developers.facebook.com/docs/reference/api/user/ like most of the others are suggesting but as a general tip, use the friends_education_history as a way to get the friend's history.
P.S: Minor spelling error in your original question that should be edited. "education_histroy." = education_history
in the second line of your main paragraph.
You can use this code you will get name, profile picture, ID of your friends.
FB.api('/me/taggable_friends', function(response) {
for (var i = 0; i < friend_data.length; i++) {
results += ''+friend_data[i].name;
}
});
Before that in your developer account created app-> go to tools and support->graph API explorer-> click Get Token. In that window click user_tagged_places and click Get Access Token. You will get your friends list.