flickr

How can I get one photo for every Flickr tag by a specific user in one request?

孤人 提交于 2019-12-06 06:50:32
Basically what I am doing is generating a page of thumbnails. There is one thumbnail for each tag that the specified user has. So if the user has used 50 different tags there will be 50 thumbnails (I'll eventually paginate this.). It works; it's just inefficient. Even with just 8 tags, this is very slow since it has to wait for 9 responses (+1 for the list of tags) from the Flickr servers. Is there a more efficient way to do this? I can't seem to find a better solution whilst scanning the Flickr APIs. Below is what I am currently using to do this. <?php function get_api_url($additional_params)

AngularJS - Calling Flickr API fails with warning message

你离开我真会死。 提交于 2019-12-06 00:50:23
I have a simple AngularJS app that allows one to search for Flickr photos. The problem is in IE I get the the following message when I call the Flickr API: This page is accessing information that is not under its control. This poses a security risk. Do you want to continue? If I click Yes, the app works and loads the relevant photos. However, in Chrome and Firefox I do not get any message and nothing happens - no photos are loaded. Here is the code: function PhotoController($scope, photoData) { $scope.thumbSize = 'small'; $scope.setThumbSize = function (size) { $scope.thumbSize = size; };

how to get correct JSON object from flickr API

眉间皱痕 提交于 2019-12-05 12:18:33
问题 I used flickr photo search method to retrieve public photos. when I run it with jquery, it works fine, I get the json object in correct form. { "photos": { "photo": [ { ......... } ] }, "stat": "ok" } But when I use it with AngularJs, I got the same object with a prefix jsonFlickrApi jsonFlickrApi({ "photos": { "photo": [ { ...... } ] }, "stat": "ok" }) what I used in AngularJs is: myApp.service('dataService', function($http) { delete $http.defaults.headers.common['X-Requested-With']; this

Flickr API for location based images

余生颓废 提交于 2019-12-05 10:11:05
I want to get images of cities when city name is entered in search field in iOS. I am using flickr API but whenever I enter any longitude and latitude values, I only get returned an empty array. What should I do. I am using this URL: http://api.flickr.com/services/rest/?method=flickr.photos.geo.photosForLocation&api_key=e3d577010e5979a2ad2a22714abd901e&lat=40.6700&lon=73.9400&format=json&nojsoncallback=1&auth_token=72157638668602974-e1a3a3aa1e6d3dd8&api_sig=a0233b016c863b1662aeb21a664c351a Please tell me what should I do. any help appreciated I suspect that you are seeking too precise a match

ObjectiveFlickr Photo Upload Error

别来无恙 提交于 2019-12-05 03:03:09
问题 I'm working on using the ObjectiveFlickr library to upload photos to Flickr from my iPhone app. I am able to authorize the app and perform general requests, but I am getting an error while trying to upload a photo. The photo is meant to be uploaded is an image captured using AVFoundation. Here is the relevant code: UIImage *image = [[UIImage alloc] initWithData:imageData]; if ([[AppDelegate sharedDelegate].apiContext.OAuthToken length]) { NSData *uploadData = UIImageJPEGRepresentation(image,

Flickr API returning duplicate photos

谁说我不能喝 提交于 2019-12-05 01:34:37
问题 I've come across a confusing issue with the flickr API. When I do a photo search (flickr.photos.search) and request high page numbers, I often get duplicate photos returned for different page numbers. Here's three URLs, they should each return three sets of different images, however, they - bizarrely - return the same images: http://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=ca3035f67faa0fcc72b74cf6e396e6a7&tags=gizmo&tag_mode=all&per_page=3&page=6820 http://api.flickr

Flickr JSON returning error in JavaScript cross domain

*爱你&永不变心* 提交于 2019-12-04 23:01:04
I have this code and I'm trying to return Flickr API, however I get the following error. Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback={callback}&tags=london&tagmode=any&format=json . This can be fixed by moving the resource to the same domain or enabling CORS. How do I enable this in my code? enter MyFeed.prototype.getFeed = function(data) { console.log(f.feedUrl); var request = new XMLHttpRequest(); request.open('GET', f.feedUrl, true); request.onload = function () { if

Populating a GridView with ImageViews dynamically/programmatically using a ImageAdapter

别来无恙 提交于 2019-12-04 22:18:39
问题 I try to develop an Android App which allows the user to fetch data from flickr and show it in a GridView (with some nice 3D-Animation). After some adventures i got it almost running, but now I'm stuck. Here's the problem: I got a UI Thread "LoadPhotosTask" which gets the pictures from flickr, just like the open source application photostream. In the method onProgressUpdate(LoadedPhoto... value) of that subclass I call addPhoto() . Until now everythings fine - I got some nice Bitmap and

get base64 image from image url using angular 2

不羁岁月 提交于 2019-12-04 21:46:33
I'm trying to display images that their URLs comes from Flickr photo search API. I want to convert these image URLs to base64 so I can store the images in Session Storage and only call Flickr API if images do not exist in Session Storage: export class AComponent { results: any[]; base64; constructor(private http: HttpClient, private jsonp: Jsonp, private router: Router, private storage: SessionStorageService) { if (!sessionStorage.getItem("results")) { this.http.get('https://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=378060923d01ccb122bd53491163355d&tags=jungle&per_page

Load one random flickr image & append to div

a 夏天 提交于 2019-12-04 12:27:29
问题 I'm basically trying to load in one random flickr image taken from a specific user and specific set which then gets displayed within a div with the id of 'flickr-wrap'. I'm trying to manipulate this JSON code to do what I want but haven't a clue where to start. This code currently loads in lots of images (I just want one to load in) and uses tags (but I want user and sets instead), could anyone help me out? $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?",{ id