Do I need to request the Google-places-api every time a user views a page on my website to show an image? - google-places-api

I would like to use the google places api to show images on my website pages, in order to determine if we can use this I need to know the exact behavior of this call of the image. Does it mean that every time when a user enters a page to which I have attached the google places images functionality a call needs to be performed in order to show the image?
If so I can determine how much it would cost to make use of this functionality, hence page views are equal to api calls.
Thanks in advance

The Google Places Photos API has some pretty good documentation.
For each place you want photos for, you first have to make a request to Place Search or Place Details to retrieve a photos array. Each photo that you want to display would be another request through the api using your API Key and a photoreference from the photos array.
Both types of request could either be made from client side code or from your server. If made from your server, you could reduce the number of API calls made by caching photos arrays and photos for use across many web requests.

Related

Pass an image get a list of URLs matching the image, HOW?

I'm essentially trying to do a reverse image search, i.e. I want to pass in an image and get back a results list of instances on the web where that image is found. I know Google's old API that did this is depreciated, I see some answers on SO (e.g. Google custom search for images only) that talk about doing an image search with Google's Custom Search API, but every time I dig into the code they are retrieving images from a string rather than what I'm trying to do. Is there currently any API that will help me with what I'm trying to do?
I'm sorry. I cannot write comments yet. How about this? https://github.com/tanaikech/goris
Recently, I found this. I don't know whether this is what you want.

facebook API - batch requests to one request to get image dimensions

i am reading the whole public feed of an user with facebook graph api.
the way i get the feed is:
https://graph.facebook.com/userid/feed
so, in this feed sometimes there are posted pictures which i also want to use in my app. problem is:
when i just load the image source, i am getting a very low quality image.
with facebook graph api it is possible to get image dimensions when i have the object_id of the picture/photo like this:
https://graph.facebook.com/objectid?fields=images
with this call i am getting the image with all dimensions and imagesource URL.
but for this i have to call a request again. how can i batch that together so that i can get the feed WITH the imagesTAG directly in first call?
i have tried to call first and second level but i didnt get any solution:
https://graph.facebook.com/userid/feed?id,name,message,object_id,picture,type{images}
anyway, i tried so much but i cant get the image resolutions with ONE call in that json return.
is this not possible with the graph api? or what i am doing wrong here?
thanks,
brush51
Use this complex batch request to retrieve images (replace "me/home" with your request):
[{ "method":"GET","name":"me_home", "relative_url":"me/home?fields=object_id"}, { "method":"GET", "depends_on":"me_home", "relative_url":"?ids={result=me_home:$.data.*.object_id}"}]
But note that you will get only images hosted at Facebook.

Adsense revenue depending on use of Ajax

I noticed that a website like imgur.com displays ads on each page of the website.
This means each time you press "next" to view another funny picture, AdSense refreshes.
But a website where you can scroll to view more pages(such as 9gag.com),
Ajax handles loading of more funny pictures so it's illegal to refresh Adsense when a user scrolls for more funny pictures.
Does this means 50 users staying on 9gag.com for 3 hours scrolling and viewing 300 funny pictures would help 9gag.com generate revenue equal to ONE imgur.com user that views only 1 picture?
Does this also mean I should stay away from Ajax if I wanted revenue?
This was very confusing for me, please help me understand AdSense better.
Thank you!
WEll the problem with fully scripted ajax loaded content is that Adsense cannot read it. Therefore it has a hard time displaying relevant ads, because most advertisers have chosen to target the visitor location and the keywords on the pages. So if Adsense has no text, then most of the time it's not going to be able to serve an ad.
But I looked at 9gag.com and they are using what I think is the ajax version of Adsense, or perhaps the premium version of Adsense which allows for all sorts of things and is quite different from the core Adsense program in many ways that nobody seems to know about, and few are invited. All the big publishers I suppose.
Anyway, if you do end up clicking on one of the posts on 9gag.com you'll see other ads. Granted that the way that imgr.com has things set up should encourage more content viewing per visitor and thus also some more ad viewing, but I wouldn't say that one necessarily has more traffic overall than the other. There are too many unknown factors to determine that. Not something you can do just with looking at a site. That is where having good analytics of your traffic and visitor behavior comes in.

ASP.Net MVC. Making Dynamic Images SEO Friendly

I have a website made to provide free web-based tools for making indie games. Currently, it only supports artists contributing to games. The features for helping artists consist of a set of artist community tools that allow artists to upload images based on a description, then we post that image in a gallery page. Other artists can upload their images and each image can have several revisions.
The way I chose to implement the image upload and display feature is by serializing uploaded images to a byte array and storing it in the database. When I need to display the image in the UI I just call a controller action I named "GetScaledGalleryImage" and pass in the image ID. That controller action takes the binary from the database and converts it back into an image, returning the requested image back.
This works very well functionally, but the problem I realized later is that the google crawler thinks all of my images are named "GetScaledGalleryImage" so if someone searches for "sylph" on google images, nothing comes up from my site, but if someone searches for site:watermintstudios.com getscaledgalleryimage, all of my images come up.
Here is an example of the URL that is being output in my HTML http://watermintstudios.com/EarnAMint/GetScaledMedia/68?scale=128
In the past, pre-MVC I would handle 404 errors and return content based on what was requested even if the page didn't actually exist. This would of course allow me to have the images pulled back by the image name (or description).
Is that the best way to do this? Or is there a better option? Something simpler would be better like if I could just do http://watermintstudios.com/EarnAMint/GetScaledMedia/Iris%20Doll?id=68&scale=128, but based on how google indexes images, would that give me what I need? Or do I need to provide image file extensions for maximum indexability?
Thanks all
It is important when doing Search Engine Optimization to always use alt="this is a crazy robot" for your images. This will help the crawler identify them. Note: always use alt, don't always name your images this is a crazy robot.

Does ajax asynchronous calls count towards unique page views?

I am implementing slideshow. I have two options for paging between images:
1) to implement javascript page reload which definitely counts towards unique page view.
2) to implement ajax light box control which i am not sure is unique page view for each image.
I need more information for the second scenario.
How Your ajax request is interpreted by your statistics depends on the configuration of your webserver and / or statistic script installed.
An ajax call is simply a http request, so You can count it or not, depending on the source IP of the request and maybe the user agent (for IP's behind a NAT)
How are you counting pageviews? Google Analytics, for instance, counts page views via JavaScript, so if you don't retrieve and interpret (display to the browser) the GA JavaScript, the load wouldn't be counted.

Resources