Flickr API PHP getPhotoSets Description - php

I'm trying to integrate the Flickr API with Jquery Gallerific. If you're familiar with Gallerific you know photos in the Gallery can have a caption. I'm trying to pull photos from a specific set from a user using flickr.photosets.getPhotos to get thumbnails. However, with this method it's not possible to get description for each thumbnail, only for the set so I'm having to run flickr.photos.getInfo for each photo in the set, which works but is pretty much useless as a page takes 10+ seconds to load. Does anyone know how to obtain flickr photos from a set with the individual description for each photo? I've looked through the API but can't seem to find anything.
Thanks in advance!

Never actually used the Flickr API but what about just loading the thumbnails initially, then using JSONP (or a custom "proxy" of sorts) to query photo information asynchronously after the page has loaded. Or, better yet, when the user actually hovers over an image.

Related

Accessing Photos from Posts in Google + using API?

I am trying to build a server side application (PHP) which can download photos that has been shared with me in Google +, but I couldn't find a method in Google+ PHP Client Library for this. I tried to get it through PicasaWeb API, but the Album 'Photos from posts' is not listed when trying to get the list of all albums.
Please suggest some way to do this.
Fetch the posts themselves. In there will be the URLs for the photos that you can then fetch to get the actual images.
Note that there are "resize" tags in the image URL path so if you see something like .../s2048/... or .../w497-h373/... then that will instruct G+ to give you a smaller version (which greatly reduces bandwidth and latency over requesting the full-size image and scaling it locally). Just remove that component of the path to get the full-size image.

Getting flickr thumbnail

I'm trying to get a thumbnail of flickr pictures in PHP.
All I saw was this in their API:
http://www.flickr.com/services/api/misc.urls.html
Which is a overkill. In instagr.am/twitpic and others I found a very easy way of doing so (just adding to the url the request).
Is there an option with flickr I'm missing?
If you have the URL to the Flickr image, all you have to do is modify the suffix to get a different size of the photo. For example:
http://farm1.staticflickr.com/2/1418878_1e92283336_m.jpg
This URL loads the medium sized photo. If we simply change the _m to _t, we would get the thumbnail:
http://farm1.staticflickr.com/2/1418878_1e92283336_t.jpg
You can also use s for small, z for medium, and b for large.
You could just use a PHP wrapper around Flickr API and keep it simple - http://phpflickr.com/
You can parse the photo's ID out of the URL and get the thumbnail URL via flickr.photos.getSizes. This is likely how Twitpic/Instagram handle it.
For future readers, flickr doesn't support the simple functionality that other photo sharing services does. So the answer to my question is you can't.
If you know the username of the flickr user you can try to use this small bot. It uses the feed to retrieve the last images of the user, so it works only on the last images... I hope it will help you.

Get website image from google via php

I'm working on a website for a specific client. And he wants to be able to add link to the website, and on mouse hover to have a image of that website appear.
Now, he doesen't want to take an image of the website, he only wants to input the link and have the website do everything else.
So my question is ->
Is there a way (eg. google API) to get a website image only by providing the url via php?
Sort of like in google, when you hover over a lik of a page, a tooltip pops up to the right with an image.
Any help is, as always, appriciated :)
Here is a list of 10 free thumbnail services
http://www.webresourcesdepot.com/10-free-website-thumbnail-generation-services/
You can simply refer to the URLs of these services, e.g.
<img src="http://SnapCasa.com/Get.aspx?code=[code]&size=[size]&url=[url]" />
or make a CURL call from one of your PHP scripts and temporarily store/permanently save the image that was generated.
Have recently developed Thumbnailspro.com. It is currently free to use while in beta testing as we work out the bugs, but so far its getting quite popular, you can request thumbnails directly from your website using the code below :
http://thumbnailspro.com/thumb/http://msn.com&s=150
s=Size, size can be anywhere from 10 to 1000 pixels just add s=300 to display a thumbnail 300 pixels in width. We are trying to add more options as we go for thumbnail requests and at the same time trying to keep it as simple as possible so you don't have to enter something like the code below to get your thumbnails :
http://somethumbnailsite.com/viewurl.php?url=http://msn.com&x=200&y=300&bwidth=1024&bheight=768&rotate=76&what_the_hell%20_is_all_this_crap!
So is much more effecient!
Like the service or have any bugs contact us at admin#thumbnailspro.com!
No. The only way to do this is to request the HTML for the page, render the page and then create a thumbnail from that page render. Google does this because in the process of spidering the web, they already get all that data, and they've got a nice optimized rendering engine (Chrome) that they can put the data through, and then they've got tons of online storage space to store the cached image. There's a lot of work there, though.

How can I generate a thumbnail of a web page for a facebook post?

My app is posting to users' Facebook walls, and linking to a page they have created. The page is in html. I'd like to be able to put a thumbnail of the page as the image on the wall post. I'm not sure whether this is possible or not. Anyone have any ideas?
If it helps, the page itself is stored as a series of 'elements'... for each one, I know the size and position of the element, and the content (which may be text or an image). So I can pull all that in from the database.
I guess it would be sufficient to create a thumbnail using php at the point when the user clicks 'Publish This to my wall', if that's easier than doing it on the fly - I can save the image and then link to it.
Any ideas?
I create thumbnails for my site using CutyCapt, which works very well indeed on both Windows and Linux. You can use exec to invoke this from php.
There are also web services that allow you a quota of free thumbnail snapshots, that are easy to integrate into your website. e.g.
http://www.websnapr.com/
or
http://webthumb.bluga.net/home
I figured out how to do this. I used the PHP gd library, which allows you to create a base image and then add images and text. Works pretty well.

Flickr feed problems. how to show all images from a photostream

I am using a bespoke JQuery/PHP script which parses a Flickr feed using SimpliePie and outputs an image gallery.
I have instructed my client to upload there images into their flickr account.
The images are showing but the feed seems to be limiting to 20 images, however, there are 40 images in the stream.
I have checked the API and there doesn't seem to be any paramaters to change this.
Has anyone come across this before, can anyone help me tweak the feed so that it pulls all the images in the photostream?
Here is the Flickr Stream and feed...
http://www.flickr.com/photos/44280289#N04/
http://api.flickr.com/services/feeds/photos_public.gne?id=44280289#N04&lang=en-us&format=rss_200
It appears that they do limit it to the initial 20 photos on flickr
http://www.flickr.com/help/website/
Why do I only see 20 items in RSS
feeds?
Flickr only shows the latest 20 items
in a feed. Because of this, the first
time you connect to a feed you will
only see the most recent items. But if
your RSS reader saves items (as most
do) you will see more than 20 as the
items build up over time.
But you could potentially use the flickr api, particularly http://www.flickr.com/services/api/flickr.photosets.getPhotos.html
Which allows you to get more (You will need to get an API key however)
Edit:
Though I have not personally used it I have read/heard good things about http://phpflickr.com/ which is a flickr api wrapper for php 4 and 5
Edit 2:
Unfortunately I can not comment on your comment but if you take a look at this link from the flickr code blog
http://code.flickr.com/blog/2008/08/25/api-responses-as-feeds/
Some API responses can been provided as feeds so you could try using "&format=feed-rss_200" not sure if it includes getPhotos yet though.
It seems like you want to use the photosets.getPhotos api call. It will give you a maximum of 500 photos.
Here is an example which gives you the url of the photo in url_o
http://api.flickr.com/services/rest/?method=flickr.photosets.getPhotos&extras=url_o&photoset_id=72157622766901612&api_key=[YOUR APIKEY HERE]
You need an api key to make it work.
You can also get the output as JSON directly by adding &format=json to the url.

Categories