'Determines if the exceptions is something which requires us to
ask for a new token. Examples are:
Error validating access token: Session has expired at unix time
1350669826. The current unix time is 1369657666.
(#200) Requires extended permission: publish_actions (error code 200)'

def exception_requires_new_token(self, e, graph):

    new_token = False
    if isinstance(e, OAuthException):
        new_token = True
    publish_actions = graph.has_permissions([u'publish_actions'])
    if publish_actions:
        new_token = False
    return new_token
