It seems like you're doing a lot of nested conditionals because you want to eventually fall through to `response.redirect('/share/badge/'+badgeBodyHash, 303);`

I think it would be cleaner to define that as a function and just return early when you need to:
```js
function finish(type, msg) { 
  return response.redirect('/share/badge/'+badgeBodyHash, 303); 
}

if (error) {
  request.flash('error', 'There was an error sharing your badge on Facebook');
  return finish();
}
request.flash('success', 'Your badge was successfully shared on Facebook');

```