I can drop a message and share a link to someone's wall using Facebook graph API.
However as if in http://www.facebook.com/permalink.php?story_fbid=114961875194024&id=7901103 , I want the names as a link. How can I achieve this? Thanks.
First, retrieve your friends like this:
https://graph.facebook.com/me/friends?access_token=2227470867|2.EHCI04eO2X4n4cxQlvnS2Q__.3600.1305194400.0-100001037215362|3ABwjZygEj8OZS2247vzgDoLyr4
Now, you only have to pair the names with their IDs like this:
FRIEND_NAME
If you want to make a function that transforms a text with Friends names use regular expressions.
Related
Im trying to read the facebook posts from our wall and we decided we dont want all of the posts, we just want some of them. So basicly our idea was to add a special keyword (for example: "#keyword") to each post, and then simply search for all posts that contains the keyword. I dont know if theres a smarter solution, if there is any let me know :)
What i used before:
https://graph.facebook.com/<OurID>/posts?limit=15&access_token=<privateToken>
Now i found a way to get that what i want, but its using the FQL:
SELECT message
FROM stream
WHERE source_id = <ourID>
AND strpos(lower(message), "#keyword") >= 0;
I heard that the FQL is going to be removed soon. So is there a way to convert this FQL into the Facebook graph API?
As solution i just gather all the data and filter them by myself via CRON-Job.
I want to make a request to search for 'customized' things, like: Restaurants nearby (see screenshot here)..
Another example is: Music my friends like, in the Graph API explorer, if I query music, I just get what I like, not my friends'. Any tip? tks.
me/friends?fields=music
will give you the music interests of your friends
and for nearby restaurants you will have to execute a complex query like
search?q=cafe&type=place¢er=37.76,-122.427&distance=1000
Refer to this page for search types
Is there any way to search public objects by their fields? For example:
https://graph.facebook.com/search?q=conference&type=event&fields=venue
Will get me all events matching conference and show their locations. Is there a way to filter for events in San Francisco?
I've tried something like:
https://graph.facebook.com/search?q=conference&type=event&fields=venue¢er=37.76,-122.427&distance=1000
but it doesn't seem to have any effect.
I also checked this. There is no any way to search in fields. only event search will work for TITLE of events only by Facebook and not in description also. There is get url by latitude longitude but this also not working from fb. i dont know when they will solve this issues.
https://graph.facebook.com/search?q=conference&type=event&fields=venue¢er=37.76,-122.427&distance=1000
I am quite sure it is supposed to work but can't get it right.
I am trying to retrieve my friends belonging to specific list (type=close_friends).
I am able to retrieve my lists via
https://graph.facebook.com/me/friendlists
But i need the actual friends associated with each list.
I would expect it to be something like:
https://graph.facebook.com/me/friends?fields=????
FriendList is a Graph API object supporting a members connection.
The graph Api gives me the user's friends.
But I want to know who its close friends are (SmartLists).
How can I do that using the Graph API?
You can call /me/friendlists to get the friends list. One of them should be close friends. Then go to /closeFriendsListId/members to see who is on that list. You will need read_friendlists extended permissions.
I recently saw a simpler way. /me/friendlists/close_friends?fields=members will give you the list of all members at one shot. Just wanted to put it out here in case if somebody needs help.
Similarly, call to /me/friendlists/family?fields=members will give family members.
P.S: "close_friends" and "family" are keywords and no need for a ID.
This is no longer possible. Facebook removed the ability to see the members of a friend list somewhere before version 2.5 of their API.