I'm still new at this, so please feel free to correct me (seriously, correct me, I need feedback
) but I believe the translation comes out to something like:
あまり楽しくなかったが、社交辞令として楽しかったと言った
It's never that fun, but to be nice, I said it was.
If my translation isn't flawed, として is a kind of phrase/particle meaning "as a..," "in the way of." In this sentence, I kind of read it as "in the way of being...," so "in the way of being diplomatic."
As for it's usage, I think it usually follows nouns as a particle, but dont' quote me. Whatdaya think, guys?