Google Places Web API photos - django

I use Django-google-places extension to get a list of photos (place.photos).
But the list I get is very unpredictable - pictures of users, food, etc.
Does Google provide something to get place's main picture that represents cafe/restaurant better?
Or maybe there's a way to get the best picture from list?

Place Search returns summary information about place. Maybe you can try to get photos from Place Search endpoint. https://developers.google.com/places/web-service/search.

Related

I want to get the information of exact categories from Google Photos API, such as the each people in PEOPLE categories

I want to get the information of exact categories from Google Photos API, such as the each people in PEOPLE categories ,but I find any methods in Google Photos APIs, Can you help me to get the information of exact categories?
I assume you want to programmatically get a list of categories that you can filter.
To my knowledge and after having worked with the API for some weeks, this is currently not possible.
There is a static list of categories that you can currently use for filtering at : https://developers.google.com/photos/library/guides/apply-filters#content-categories
Of course it would be nice of Google to provide a way to get this list dynamically with an API call in case this list is updated/modified in the future.
The Google Photos API is still very new and in beta, so maybe this will be a future feature from Google.

Is there a way to let a pictures add-on navigate across page breaks?

I am currently trying to create a Kodi add-on that provides pictures to the user. From what I understand from the Kodi programming instructions this is done by providing a set of links with a title from a Python script.
The pictures I want to provide are online, i.e. I need to fetch the URL and the title for each picture via an API. Since the total number of pictures is somewhat above 1000 and I can only get the title for each picture with a separate request, I would like to limit the number of entries I display and provide the user with paging as I have seen several other add-ons do.
However, the downside to this approach seems to be that when you are looking at a picture and navigating via the right/left arrow keys to next/previous picture, Kodi will not be able to load the next page. Instead, it will only cycle through pictures on the current page.
Is there a way to avoid this, i.e. to tell Kodi to load the next page once it reaches the end of the current page?

Facebook Graph API to search user statuses

I am trying to pull some of my facebook statuses that contain a particular keyword and show them on a web page, what is the url query string I should use?
The best I can came up with is graph.facebook.com/me/statuses
But it returns all the statuses, but i want statuses that contain a particular keyword, such in a search, how should I do it? Or is it even possible?
You'll have to manually go through the statuses returned from /me/statuses to find the ones that you care about. Facebook doesn't really let you use their computing power to search stuff like that.

Obtaining the location of places on facebook and integrating it into window phone app

I am trying to obtain information of a users current location I already have the users latitude and longitude what I want to know is are there any businesses (restaurants, clothing stores ect.) in that area. I was just looking at the open graph api and It says that you can search over all public objects in the social graph with https://graph.facebook.com/search. We support searchs for the following types of objects: places https://graph.facebook.com/search?q=coffee&type=place but the ones I really want to use type=location&center=37.76,-122.427&distance=1000 does not work in the API Explorer could anyone tell me what might be the problem and how do I use this in a windows phone 7 app? Links, code snippets, blog post, ebooks, Other web services that would allow me I could send lat and long and will return the location or businesses anything will be very helpfull thanks
https://graph.facebook.com/search?q=coffee&type=place&center=37.76,-122.427&distance=1000
This query should give you the results you need.

How To Get Historical "Facebook Page Likes" Data via Graph API or FQL

Was wondering if anyone knows how to get the historical data for any Facebook Page.
For example, number of fans for RedBull fan page on a given day in the past or for a given period that ends today so that I can show fan development of any page over a given period.
I tried it with the graph API and FQL (insights) but no luck.
https://graph.facebook.com/{USERNAME}/insights?fields=likes&period('week')&end_time_date('2011-06-26') --> empty result
Pulling the data via FQL also returns no results, plus it seems without a read_insights permission nothing is possible for page data
I'd need this to be available with only a generic user access token. This data is publicly available anyway. Result should be somewhat like this: http://www.socialbakers.com/facebook-pages/australia/
https://graph.facebook.com/{{pagename}}/insights/page_views?access_token={{access_token_key}}&since=1420070400&until=1421625600
Since & until parameter in the above code takes in unix time.
add necessary information in the {{ }} and this code should work.
Without insight permission I recommend that you write something to perform a nightly query on the page graph and record the stats you need. If the page is public most of the information shown on that site is available.
You could also scrape info from http://pagedata.appdata.com if the page has already been listed...