I'm busy with an app and I use Facebook's Graph API for that. I am trying to search Events with this url: https://graph.facebook.com/search?q=Party&type=event¢er=54,2&distance=100&access_token=%#.
When I load the results, I get some Events, but they're not even close to the given coordinates.
Does anyone know if I am using the right URL or is there a better one?
Thanks,
Jelle
I think center and distance are used for type=place, not for type=event.
Related
Actually, I get the corresponding response as in the form of GMSAutoCompletepredictions for my auto completion location search request with Google API. With the prediction results, we didn't get more detail info like coordinates, formatted detail address, etc of location.
If we need more detail info for location, we need to to give one more request to Google plcaes API with place ID value avail in prediction results. This method may increase the API usage and affect the app performance.
Please help me to overcome this problem. Thank You :)
There is no other way for now. To get more info from prediction results you have to request the place by placeId.
I'm developing an iOS application that let the user to search for a person throught the Graph API.
What I want is the SAME behavior that it's present on the Facebook website. You know when you begin to search for a person in the top text input? The first results will be mostly your friends AND some people you MAY know or people you already looked for.
The problem? Try to use the same search pattern here to search a person: Graph Api Explorer
The Graph Api returns DIFFERENT results than the search input on the Facebook website.
Does anyone knows why? Is there a way to achieve the same results?
Facebook are using many algorithms to display search result like Relevance Indicators, Complexities of User-Centric Search and The Product.
One of the algorithm to display result on their page as below.
Personal Context:
Unlike most search engines, every Facebook search involves two key elements - a query and a querier.
Just as we need to understand the query, it’s as essential to understand the person behind the query.
People are more likely to be looking for things located in their own city/country or for people who share the same college/workplace.
We consider this information and much more when ranking results. The more we know about you, the better your search results will be.
In Graph API, they are not using this algorithm.They are just displaying the queried result. Hence you can not achieve same result using graph search API.
To achieve this you can use following apporach -
Get the friend list of user using me/friends?limit=1&offset=1
Get the user list using search api
merge both the result
show result(s) to user
For more information(approach/algorithm) you can check Intro to Facebook Search
Is there a way to achieve the same results? - NO
Does anyone knows why? - NOT REALLY
(Edit: Seems in another answer, someone does actually, but it doesn't change the answer for "If you can achieve it")
But its safe to presume that Facebook does not allow all functionality through the API, why would they after all ? They need to keep the people coming to their own platform. So I can't give you a straight forward response on WHY, but IF ? Not possible, there is zero documentation about more specified search for type user. When you request user friends, you will only get the user friends who are using the same app starting v2.0
Am afraid that you will have to drop the functionality you want to achieve.
It is not just the graph search. When you refresh your TimeLine. The order of posts gets changed every time because Facebook takes a Pull on Demand approach. Which means whenever you login, the data from your friends is fetched. Which is why facebook has a limit to maximum number of friends.
Talking about the Graph search and Graph API. They are not same and the Graph Search cannot be accessed through the Graph API. So, you would have to change your approach.
To explain why the graph search gives different results on same search term. I would guess that it follows the game Pull on Demand model ( although it is not open and we cannot know for sure ). Following that model makes sense though.
Thanks
I am working on my app, it has the mapView inside and the user location. Then, I need to get direction from user location to particular place on the map, how do I do that. I'am searching around and it seem to be like that Apple does not allow to do it on Apple map.
Please give me some advices and thanks so much.
As John commented, you can't get directions via a UIMapView, as Apple doesn't provide an API you can use to do so. If you really need an API for directions and don't want to write it yourself, check out the following APIs:
MapQuest
CloudMade
Google Directions Web API
Using one of the listed sources, you can make an HTTP request to a server that will return a result (likely in JSON) that includes both directions and an ETA.
For example, the following MapQuest API call will return a JSON item called distance, which contains the formatted distance (in miles) that the recommended route between Lancaster and York will take. Just remember to pass in your API key.
http://www.mapquestapi.com/directions/v1/route?key=YOUR_KEY_HERE&from=Lancaster,PA&to=York,PA&callback=renderNarrative
For further explanation, have a look at the MapQuest documentation.
Hi all I need to know on how to pass two points (longitude and latitude) in http://m.bing.com/directions? to draw a route and show driving directions to the user.
I had find a solution by trial and error in this is the resulting URL: http://m.bing.com/directions?IIG=acc63aafc7ac4348b2fa7662d871504a&kval=3.1&appns=mSERP&cutc=1362555191520#/Maps?q=37.332333,-122.031219,,,,current%20location~42.983391,-81.233040,,,,current%20location&ul=&mode=1&autoredirect=0
I'm passing this from my app to safari mobile.
I need to know a proper way of passing two point and also if there are other parameters if there are any.
I googled for many hours and nothing is resolved.
Thanks!
you might be able to use the same parameters than with the bing maps portal, see the documentation here and if the user is using a mobile platform, he should be redirected to the mobile version:
http://onlinehelp.microsoft.com/en-us/bing/ff808440.aspx
Here is also an interesting article from Alastair on his blog:
http://alastaira.wordpress.com/2012/06/19/url-parameters-for-the-bing-maps-website/
I am playing around with the Twitter Streaming API and have got my head around it at a basic level, but I can't seem to get reliable results for the location - I'm using a bounding box as specificed in the docs, the location I want to track is Glasgow but I am getting results from all over the world.
My bounding box is $locations = '55.67,-4.66,56.17,-3.892540';
Does anyone know how to get the correct bounding box? If these are correct, then is there another explanation for what might be happening? Thanks!
You have it in latlon, twitter wants it lonlat. IOW, try '-4.66,55.67,-3.98,56.17'. BTW, IME, you'll still get tweets outside of the bounding box but hopefully not from "all over the world". :-)