Class rewritten to get rid of deprecated APIs and make use of current Facebook API