{"size": 737, "ext": "js", "max_stars_repo_path": "Resources/templates/controllers/about_detail.js", "max_stars_repo_name": "roomtoread/HackToHelp", "max_stars_repo_stars_event_min_datetime": "2015-02-01T14:25:27.000Z", "max_stars_repo_stars_event_max_datetime": "2015-02-01T14:25:27.000Z", "max_issues_repo_path": "Resources/templates/controllers/about_detail.js", "max_issues_repo_name": "roomtoread/HackToHelp", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Resources/templates/controllers/about_detail.js", "max_forks_repo_name": "roomtoread/HackToHelp", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 30.7083333333, "max_line_length": 77, "alphanum_fraction": 0.5888738128}
module.exports = function(view) {
  var FbGraph = nrequire('/lib/fb_graph'),
      Twitter = nrequire('/lib/twitter');
      
  var TWEET_MSG = "I like @MSF_USA",
      FB_MSG = "I like this page!",
      FB_LINK = 'http://www.facebook.com/msf.english',
  
      tweet = function() {
        Twitter.tweet(TWEET_MSG, function(e){
          if(e.success) { alert("You've successfully tweeted"); }
        });
      },
  
      fbShare = function(e) {
        FbGraph.wallPost({message:FB_MSG, link: FB_LINK}, function(e){
          if(e.success) { alert("You've successfully posted to your wall"); }
        });
      };    
  
  view.tweet_button.addEventListener('click', tweet);
  view.fb_button.addEventListener('click', fbShare);
};
