$http and flickr.photos.search

741 views
Skip to first unread message

sep...@gmail.com

unread,
Apr 3, 2012, 4:55:44 AM4/3/12
to ang...@googlegroups.com
I have a jsonp service on Flickr: http://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=ee07fe3a2938bdc926aeb6341f3e4128&tags=flower&per_page=3&format=json&api_sig=08e8610534dc21795f8b4f2aee53d30d
when I check in on http://docs-next.angularjs.org/api/angular.module.ng.$http it doesn't work its giving:
http status code: 0
http response data: Request failed 

I can see the response getting through via firebug though... any idea why ?


Bretto

unread,
Apr 3, 2012, 5:27:42 AM4/3/12
to ang...@googlegroups.com
I have tried different combination
http://www.flickr.com/services/api/explore/flickr.photos.search

 

 

doesn't work

Mykhailo Kotsur

unread,
Apr 3, 2012, 5:28:31 AM4/3/12
to ang...@googlegroups.com
Do you use $http.jsonp ?
It would be easier to help you could give a link to jsfiddle with your code.

zdam

unread,
Apr 3, 2012, 5:30:23 AM4/3/12
to ang...@googlegroups.com
Here is a fiddle attempting your call:  http://jsfiddle.net/zdam/aC9z5/ 

Click the test button, it returns from flickr with an invalid signature error..

Bretto

unread,
Apr 3, 2012, 5:48:24 AM4/3/12
to ang...@googlegroups.com
Thanks I updated the url to 'http://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=1575186a45e4deb9a25736f259ddf991&tags=flower&per_page=3&format=json&callback=JSON_CALLBACK' and it works in your fiddle
Why doesn't it work on the angular example page and what is that callback=JSON_CALLBACK

Misko Hevery

unread,
Apr 3, 2012, 12:54:59 PM4/3/12
to ang...@googlegroups.com
Hmm JSONP_CALLBACK is undocumented, our fault.

It is the location which gets the auto-generated callback function.

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/angular/-/6mQZ-W4u9bIJ.

To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.

Bretto

unread,
Apr 3, 2012, 9:20:23 PM4/3/12
to ang...@googlegroups.com
I still can't seem to get the success working could some show how to wire this up ? and when i have the error handler un-commended it doesn't even work...

http://jsfiddle.net/Bretto/agG3s/4/

 
To unsubscribe from this group, send email to angular+unsubscribe@googlegroups.com.

zdam

unread,
Apr 3, 2012, 10:50:07 PM4/3/12
to ang...@googlegroups.com
It is the jsonFlickrApi function that gets called.

Bretto

unread,
Apr 3, 2012, 11:01:29 PM4/3/12
to ang...@googlegroups.com
Thanks i can move on :)
Reply all
Reply to author
Forward
0 new messages