How does Facebook search work? - facebook

More specifically, what factors determine the priorities they assign in response to a given query? I'm looking for answers that address numerous scenarios including queries that...
Specify the "type" of result (objects such as users, posts, pages, etc. or connections like friendships, likes, tags, etc.),
Have authentication tokens as well as ones that don't.
Have conditionals such as "since" and "until."
Don't even specify a type, such as this search for the word query.

I am actually working on an app that uses /search to search places and I use a bit of all scenarios. I couldn't write down a specific order they appear in and to be honest I highly doubt it's something as easy.
I'm 99% sure it works like the Search in Facebook does, using the user data to bring up the most relevant results. I live in Ireland for 2 years now, but while testing the app I constantly receive search results from Romania and actually close to my Hometown, which are relevant to me.
Regarding your observations, Facebook's algorithms might take into account the source of the request as well - which would be good, means it only improves as your app gets more users.

Related

How to examine what a facebook 'topic' encapsulates?

When selecting topics for facebook ads, many are duplicates. If my experience with databases has taught me anything, it's that humans enter data in all sorts of ways. So I guess facebook's algorithms have found 'topics' based on how humans have entered them. So I guess duplicates could result because of a trailing space or something like that.
From the UI, I cannot tell the difference between topics which appear identical, but which may have very different followings (e.g. one may have 10m associated users, another might just have 100 if it's an uncommon typo with a trailing space).
How can I view more information on facebook 'topics'? Is there an API call for this?
Example
Here is an example of a duplicate topic
Here's where the topics can be found (requires login)
NB: as a corollary to the above, when there are duplicates (or triplets) is it beneficial to select all of them, or is selecting just one enough to maximise the effect?
You can find the solution by creating an ad from the Business Manager. Short answer is that the duplicates belong to different categories.
In your case, if you look for "Sonic drive-in", Facebook will give you the following choices (see pic):
Sonic drive-in as interest (e.g. to target those who like a related page)
Stackoverflow as an employer (to target those working there)
So, it depends on what you need for your ads.

Does Facebook's personal ranking algorithm leak external profile data?

I recently came across this script that extracts friend rank data from the currently logged-in Facebook profile and presents it as a table.
After trying the script personally, I became puzzled as to why certain individuals were consistently ranked higher than others. The rank seems to refresh daily, so I have experimented with various user interaction, and this shifts many entries appropriately; however, the same 'certain individual(s)' would often (with no discernible interaction) arbitrarily move up in rank.
My question is this: is it possible that this rank is being affected by other, external profile's usage data/habits?
In the interests of privacy, it seems very unlikely that anything but personal habits would influence this ranking, but my own and other peoples' usage anecdotes seem to suggest 'arbitrary' movement that would only be explained by external data.
I cannot seem to find a definitive answer to this elsewhere.
Any input would be greatly appreciated.

What is the significance of OrderedFriendsListInitialData?

When you're logged in, in the page source, there is a list called OrderedFriendsListInitialData.
According to rumour, it's a list of people that visit your profile the most, others say that it's a list of profiles you view the most, and yet other say it's the friends you interact with the most.
Can anyone shed some light on this by providing a definitive answer, or at least an educated one?
If You check the code You will notice it has something to do with right sidebar. Just before it in there is this url https://s-static.ak.facebook.com/rsrc.php/yT/r/q-Drar4Ade6.ogg
As it is JSON string obviously it has to be related, file this url is pointing at is sound notification for chat.
As You may notice it is initial data not chat list probably later chat script use this data to fill up people on list and make some extra check etc..
There is word ordered as well, Myself I'm not really active on facebook so have no way of checking it but it is known that fb analyses all Your steps and make this list based on thousands of factors to provide You with list of users You are likely to chat.
You father may be there because fb knows You are family and consider it as high possibility of conversation.
Send email to them If You want details.
Well in the time passed since you first posted this they've changed the name of the list to InitialChatFriendsList which I suppose is a little more descriptive of what it is, but as far as how they determine what to put on there I think my friends and I have come up with a very plausible explanation.
When determining who you are most likely to communicate with on their chat system, facebook will obviously use a whole number of factors weighted differently to determine who you most want to talk to and who you most need to talk to.
the most important is who you actually talk to... who on fb chat that you communicate with most frequently will obviously show up on your chat list.
who you have public interactions w/ (i.e tagging in at some location, picture tagging, actual wall comments etc.)
Now those two are two very large factors when determining who they put on your list, beyond that it is a combination of who looks at your page and whose page you look at. Based on my list and the list of my friends, we determined that if you are inclined to look at somebody else's page/posts a lot and they are likely to do the same for you, they will move up in rank even if you don't have an actual interactions on facebook. A couple of people who I would admit to "stalking" the most on fb are not even on my list (at least not on the top 50 which is where i stopped checking) while other people who I do occasionally look at and I have reason to believe they would be looking at my profile as well are fairly high on my list (around 10-15th place). And of course there are the completely random individuals who show up on the list who probably are stalkers.
Anyways, my point is there are so many factors that determine who is going to be on this list, you really can't just attribute it all to people who stalk you and people you stalk. While in for some people that would be the case, for most of the people on the list there is a whole list of reasons they're on there.
Of course this is all based on a very small pool of data, so who knows...
I think it may be the list of people who are on the top part of your chat list - the people you're statistically most likely to talk to. But! I may be wrong.
It definitely is the people who facebook considers are the most likely you are going to chat with. There are two lists of people in chat, one of the above, and the other friends who are online.
I believe the first 3 are accurate. When I checked for myself, my boyfriend was one, and my two best friends were 2 & 3. Everything after that seems to be a bit random, because #4 was a person I haven't interacted with for years.

How to search for query on user's wall in Facebook API

I want to find all user's posts that matches to my pattern.
Assume I have all permissions I need.
I tried
https://graph.facebook.com/me/posts?q=query&limit=10
but in response I get only 1-3 matches (on the next page of results there are another 1-3 matches etc.)
What can I do to get e.g. 10 of them per page?
Please read this nice blog about how the items can get "lost" when requesting 10 and then only getting 3
http://developers.facebook.com/blog/post/478/
Facebook uses a very poor implementation here.
You might notice that the number of results returned is not always equal to the “limit” specified. This is expected behavior.
It's kinda crazy how they actually write a blog article on how poor their pagination/filtering really is. Kinda like their proud of it or something. Definitely nothing to be proud of here. Lol, "this is expected behavior"?!?
And I also love this line.
This can make paging difficult and confusing.
Facebook's saying: Let us not only be proud of our crappy design but also then rub it in the users' noses!!
In my opinion, Facebook should query all results (even more than the limit says), determine what can be shown to the user, and filter the results, and THEN start pagination and limits on that.
Facebook, hear my cry, hire or rent some talented database engineers to come in and help you solve this huge problem. Also stop posting blog articles like you're proud of the fact that it's messed up.

Geolocation APIs: SimpleGeo vs CityGrid vs PublicEarth vs Twitter vs Foursquare vs Loopt vs Fwix. How to retrieve venue/location information?

We need to display meta information (e.g, address, name) on our site for various venues like bars, restaurants, and theaters.
Ideally, users would type in the name of a venue, along with zip code, and we present the closest matches.
Which APIs have people used for similar geolocation purposes? What are the pros and cons of each?
Our basic research yielded a few options (listed in title and below). We're curious to hear how others have deployed these APIs and which ones are ultimately in use.
Fwix API: http://developers.fwix.com/
Zumigo
Does Facebook plan on offering a Places API eventually that could accomplish this?
Thanks!
Facebook Places is based on Factual. You can use Factual's API which is pretty good (and still free, I think?)
http://www.factual.com/topic/local
You can also use unauthenticated Foursquare as a straight places database. The data is of uneven quality since it's crowdsourced, but I find it generally good. It's free to a certain API limit, but I think the paid tier is negotiated.
https://developer.foursquare.com/
I briefly looked at Google Places but didn't like it because of all the restrictions on how you have to display results (Google wants their ad revenue).
It's been a long time since this question was asked but a quick update on answers for other people.
This post, right now at least, will not go into great detail about each service but merely lists them:
http://wiki.developer.factual.com/w/page/12298852/start
http://developer.yp.com
http://www.yelp.com/developers/documentation
https://developer.foursquare.com/
http://code.google.com/apis/maps/documentation/places/
http://developers.facebook.com/docs/reference/api/
https://simplegeo.com/docs/api-endpoints/simplegeo-context
http://www.citygridmedia.com/developer/
http://fwix.com/developer_tools
http://localeze.com/
They each have their pros and cons (i.e. Google Places only allows 20 results per query, Foursquare and Facebook Places have semi-unreliable results) which can be explained a bit more in detail, although not entirely, in the following link. http://www.quora.com/What-are-the-pros-and-cons-of-each-Places-API
For my own project I ended up deciding to go with Factual's API since there are no restrictions on what you do with the data (one of the only ToS' that I've read in its entirety). Factual has a pretty reliable API, which as a user of the API you may update, modify, or flag rows of the data. Facebook Places bases their data on Factual's, just another fact to shed some perspective.
Hope I can be of help to any future searchers.
This is not a complete answer, because I havn't compared the given geolocation API, but there is also the Google Places API, which solves a similiar problem like the other APIs.
One thing about SimpleGeo: The Location API of SimpleGeo supports mainly US (and Canada?) based locations. The last time I checked, my home country Germany doesn't has many known locations.
Comparison between places data APIs is tough to keep up to date, with the fast past of the space, and with acquisitions like SimpleGeo and HyperPublic changing the landscape quickly.
So I'll just throw in CityGrids perspective as of February 2012. CityGrid provides 18M US places, allowing up to 10M requests per month for developers (publishers) at no charge.
You can search using a wide range of "what" and "where" (Cities, Neighborhoods, Zip Codes, Metro Areas, Addresses, Intersections) searches including latlong. We have rich data for each place including images, videos, reviews, offers, etc.
CityGrid also has a developer revenue sharing program where we'll pay you to display some places as well as large mobile and web advertising network.
You can also query Places via the CityGrid API using Factual, Foursquare and other places providers places and venue IDs. We aggregate data from several places data providers through our system.
Website: http://developer.citygridmedia.com/