Where I can find restaurant data for android application? - web-services

I would like to know if there is a free api that would allow me to get restaurant information for an android application. The Application is supposed to search for nearby restaurants and display to the user. The problem is that there are some criteria that the restaurants must satisfy. The specific information I need is: location, type of food (mexican, italian, burger, etc.), type of restaurant (sit-down, fast food, buffet, etc.). Would there be any api that would give me these information? I know that I can use apis like Google custom search but the problem is that the result may not include all the information I want to have on every query( type of food, type of restaurant...)
thanks

As mentioned, the Yelp! API allows you to filter based on a lot of categories. The other alternative would be the Google Places API, but that doesn't give you the sort of contextual information about the restaurant that you want.

Related

Countries: A list of their state/province and cities list

I want to get all the countries, their states/province and cities in the world.
Where can I find this information?
Somebody please help me. I have searched many times, but I couldn't find it anywhere.
Check out django-cities which provides a list of countries and cities of the world. You will need to use http://www.geonames.org/ to import their database. Alternatively, you can directly download their database (in text format) and extract the values you need.
You can try using Yahoo's GeoPlanet API.
http://developer.yahoo.com/geo/geoplanet/guide/api-reference.html#api-countries
The more specifically relevant portions are on
/countries/
/counties/{state}
There are even examples on how to retrieve entire list of countries on the page. Based on the state, you can also retrieve counties.
Additional:
If you are more specifically looking to do geocoding, you can try Google Maps Geocoding API located below:
https://developers.google.com/maps/documentation/geocoding/?hl=fr
This will allow you to get region specific information on your location of interest.

facebook opengraph, how to make customized queries?

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&center=37.76,-122.427&distance=1000
Refer to this page for search types

Joomla 2.5 registering different kinds of users

Maybe this isn't the correct place to ask, but I asked this question on Joomla forums and did not get any answers. If someone can help me or at least point me in the right direction, I would really appreciate.
My question is: In a Joomla 2.5 website, I want to create two different kinds of forms for registering users. Maybe "registering" isn't the correct term. I want to create something like a very simple database which will hold records for two kinds of users:
- one which will be interested in working in projects, so in this case the form will have more fields and specific details to fill
- one which will be interested only in receiving newsletters from the site, and in this case only basic contact information will be required.
I did some research and found an extension named AcyMailing which can handle the newsletters for example, but I need to have all my potential users registered as Joomla users. I would like to avoid that if possible. If not, how can I differentiate the two kinds of users on registration, so the visitor can choose which option he wants and in this case, add more information to the registering process, if possible.
I'm not very experienced with Joomla, but since the site in question is already implemented using it, I don't have much choice.
Thanks in advance!
Chronoforms. Most definitely here would be a great use for their AWESOME free component. Your forms can work as registration forms (should you desire that); or can also just be free standing forms that log the information filled out on them to your database which you can later use however you would like (i.e. compiling a mailing list or something of that sort).
The form wizard makes it almost bullet proof, then you can have a form for 1 type of user to fill out, and a form for a different user build different ways.
That will get you the data - in order to mass mail those people you'll need a way to extract their emails out of the database (or find an email component that will let you email based on certain fields in the database or what have you); but it's totally possible and would be easily done I think with 1 simple mySQL query on your database table created by chronoforms.
In terms of something that will solve your issue quickly and get you the info you're looking for in two separate ways - chronoforms will do that exactly.

What fields/properties can be queried from Facebook Graph API on a Place object?

I'm doing a query of this form:
https://graph.facebook.com/search?q=Beshoff&fields=likes,checkins,products,name,talking_about_count,description,category&type=place&center=37.327453,-121.813102&distance=400
I am interested in finding out the exhaustive list of fields that can be selected for a Place object.
In particular, on the facebook page for a specific place, there are often multiple categories listed which I have been unable to figure out if it's possible to retrieve using the Graph API.
e.g. On https://www.facebook.com/BeshoffInfiniti, there is an entry "Car Dealership" but the graph api call above returns "Local business".
If you leave out the "fields" attribute in your query you will get all the fields. The number of fields depends on the object type (for example owned pages vs. wiki pages)
Don't just look at the Graph API. Take a look at FQL. There are different fields available in FQL vs. the API. And yes, using the distance function you can look for places in an area.
Graph API != FQL
One thing to try is the Facebook Open Graph schema entry for Page and Place.
You'll find all the additional fields for Pages. You can think of places as a subclass of pages.
If you're curious about the types of page that might be returned, try having a look through the create a page flow.

Multiple Parameters in Graph User query/search?

The FB Graph API shows how I can search for all users named "Mark" anywhere in the world:
https://graph.facebook.com/search?q=mark&type=user
but I would like to be able to search, for example, by location and interest, like all users in Los Angeles who like Soccer.
I looked through the API documentation, and forums, but although I imagine this would be a common question (whether it's possible or not), I couldn't find anything.
Thanks for any help.
The current implementation of the Graph API makes these types of searches impossible.
First, the search query structure is dependent on the type of resource being searched. It is not coincidence that the majority of search queries in the documentation only include one search term and do not allow you to restrict the fields being searched. Outside of a limited subset of types (like Places), it is not possible to use multiple terms and it may not be possible to get results for the fields you want to search (e.g. you can't search for Pages by location).
Second, all methods of the Graph API follow Facebook's permissions. If you look at the documentation on User objects, you will note that both the location field and the likes connection require extended permissions (user_location and user_likes respectively) in order to access them. Since both of these fields are private by default, there is no way to find users with a location in Los Angeles, or who like soccer.
I suspect that this is because the Graph API's purpose is not to allow programmers to do granular searches over Facebook's userbase, but to "promote rich social applications".