Difference between revisions of "JSONp"

From BC$ MobileTV Wiki
Jump to: navigation, search
Line 13: Line 13:
 
=== YouTube ===
 
=== YouTube ===
  
* '''YouTube widget (via JSONp): http://bcmoney-mobiletv.com/metaweb/youtube/'''
+
* '''YouTube video widget (via JSONp): http://bcmoney-mobiletv.com/metaweb/youtube/'''
 
* YouTube AJAX API integration (video/playlist search): http://www.yvoschaap.com/youtube.html
 
* YouTube AJAX API integration (video/playlist search): http://www.yvoschaap.com/youtube.html
  
Line 19: Line 19:
 
=== Flickr ===
 
=== Flickr ===
  
* '''Flickr widget (via JSONp): http://bcmoney-mobiletv.com/metaweb/flickr/'''
+
* '''Flickr image widget (via JSONp): http://bcmoney-mobiletv.com/metaweb/flickr/'''
 
* Flickr AJAX API integration (photo/photoset search): http://kylerush.net/javascript/tutorial-flickr-api-javascript-jquery-ajax-json-build-detailed-photo-wall/
 
* Flickr AJAX API integration (photo/photoset search): http://kylerush.net/javascript/tutorial-flickr-api-javascript-jquery-ajax-json-build-detailed-photo-wall/
 +
 +
 +
 +
=== Last.fm ===
 +
 +
* '''Last.FM audio widget (via JSONp): http://bcmoney-mobiletv.com/metaweb/lastfm/'''
 +
* Last.fm Web Services: http://www.last.fm/api/show?service=286
 +
* Last.fm JSON/JSONp Web Service Extensions: http://lastfm-api-ext.appspot.com/docs/
 +
* Last.FM - Recent Tracks widget (using jQuery and JSONp): http://wordpress.org/extend/plugins/lastfm-recent-tracks-widget/
 +
  
  
 
=== Twitter ===
 
=== Twitter ===
  
* '''Twitter widget (via JSONp): http://bcmoney-mobiletv.com/metaweb/twitter/'''
+
* '''Twitter real-time messaging widget (via JSONp): http://bcmoney-mobiletv.com/metaweb/twitter/'''
 
* Twitter JSON/JSONP API URL: http://jquery-howto.blogspot.com/2009/04/twitter-jsonjsonp-api-url.html
 
* Twitter JSON/JSONP API URL: http://jquery-howto.blogspot.com/2009/04/twitter-jsonjsonp-api-url.html
 
* Creating a live Twitter status update with YQL and JavaScript: http://www.bukisa.com/articles/206910_creating-a-live-twitter-status-update-with-yql-and-javascript
 
* Creating a live Twitter status update with YQL and JavaScript: http://www.bukisa.com/articles/206910_creating-a-live-twitter-status-update-with-yql-and-javascript
Line 32: Line 42:
 
=== Facebook ===
 
=== Facebook ===
  
 +
* '''Facebook social networking widget (via JSONp): http://bcmoney-mobiletv.com/metaweb/facebook/'''
 
* New Facebook Javascript API: http://blog.toppingdesign.com/2010/04/26/new-facebook-javascript-api/
 
* New Facebook Javascript API: http://blog.toppingdesign.com/2010/04/26/new-facebook-javascript-api/
 
* JavaScript-Based Authentication: http://developers.facebook.com/docs/authentication/javascript
 
* JavaScript-Based Authentication: http://developers.facebook.com/docs/authentication/javascript
Line 38: Line 49:
  
  
=== Last.fm ===
 
 
* Last.fm Web Services: http://www.last.fm/api/show?service=286
 
* Last.fm JSON/JSONp Web Service Extensions: http://lastfm-api-ext.appspot.com/docs/
 
* Last.FM - Recent Tracks widget (using jQuery and JSONp): http://wordpress.org/extend/plugins/lastfm-recent-tracks-widget/
 
  
  

Revision as of 12:33, 29 May 2010

JSON with Padding (commonly abbreviated JSONP) is a JSON extension wherein a prefix is specified as an input argument of the call itself. This padding prefix is typically the name of a callback function, but may also be a variable assignment, an if statement, or any other Javascript statement prefix. The original proposition appears to have been made in the MacPython blog in 2005 [17] and is now used by many Web 2.0 applications such as Dojo Toolkit Applications, Google Toolkit Applications[18] and Web Services. Further extensions of this protocol have been proposed by considering additional input arguments as, for example, is the case of JSONPP[1] supported by S3DB web services.

Because JSONP makes use of script tags, calls are essentially open to the world. For that reason, JSONP may be inappropriate to carry sensitive data.[20]

Including script tags from remote sites allows the remote sites to inject any content into a website. If the remote sites have vulnerabilities that allow JavaScript injection, the original site can also be affected.[2]



Examples

YouTube


Flickr


Last.fm


Twitter


Facebook

[3]




External Links


References

  1. Almeida, Jonas (June 11, 2008). "JSON, JSONP, JSONPP?". S3DB: http://sites.google.com/a/s3db.org/s3db/documentation/mis/json-jsonp-jsonpp. Retrieved April 26, 2009.
  2. wikipedia: JSONP#JSONP
  3. Facebook JavaScript Client Library: http://wiki.developers.facebook.com/index.php/JavaScript_Client_Library


See Also

JSON | AJAX | jQuery | JavaScript | XSS