def check_fb_user_existence(email):
    try:
        response = Service.check_fb_user_existence(email)
        if (response):
            return jsonpickle.encode(response, unpicklable=False), 200
        else:
            return jsonify({"Error": "Something went wrong"}), 500
    except Exception as e:
        return jsonify(e), 500
def register_fb_user():
    data = request.json
    try:
        response = Service.register_fb_user(data)
        if (response):
            response = Service.check_fb_user_existence(data['email'])
            return jsonpickle.encode(response, unpicklable=False), 200
        else:
            return jsonify({"Error": "Something went wrong"}), 500
    except Exception as e:
        return jsonify(e), 500