This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 27th, 2012  |  syntax: None  |  size: 1.43 KB  |  views: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.   var solos = {}
  2.  
  3.   // FACEBOOK
  4.   solos["facebook"] = {
  5.     settings: {
  6.       api: 'https://graph.facebook.com/{username}/feed?limit={posts}&callback=?',
  7.       post_builder: build_facebook_post,
  8.       data_handler: function (data, settings, jq){
  9.         $.each(data.data, function (i, item){
  10.           $(jq).append(settings.post_builder(item, settings));
  11.         });
  12.       }
  13.     },
  14.     options: {
  15.     }
  16.   };
  17.  
  18.   // TWITTER
  19.   solos["twitter"] = {
  20.     settings = {
  21.       api: "http://twitter.com/status/user_timeline/{username}.json?count={posts}&callback=?",
  22.       post_builder: build_twitter_post,
  23.       username: ''
  24.     },
  25.     options: {
  26.     }
  27.   };
  28.  
  29.   // TWITTER LISTS
  30.   solos["twitter_list"] = {
  31.     settings = {
  32.       api: "http://api.twitter.com/1/{username}/lists/{listname}/statuses.json?per_page={posts}&callback=?",
  33.       post_builder: build_twitter_post,
  34.       username: '',
  35.       listname: ''
  36.     },
  37.     options: {
  38.     }
  39.   };
  40.  
  41.   // LASTFM
  42.   solos["last_fm"] = {
  43.     settings_lastfm = {
  44.       api: 'http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user={username}&api_key={api_key}&limit={tracks}&format=json&callback=?',
  45.       post_builder: build_lastfm_post,
  46.       username: '',
  47.       api_key: '',
  48.       data_handler: function handle_lastfm_data(data, settings, jq){
  49.         $.each(data.recenttracks.track, function(i, item){
  50.           $(jq).append(settings.post_builder(item, settings));
  51.         });
  52.       }
  53.     },
  54.     options: {
  55.     }
  56.   };
clone this paste RAW Paste Data