Esempio n. 1
0
    def __init__(self, facebook_token=None, XAuthToken=None, proxies=None, facebook_id=None):
        if facebook_token is None and XAuthToken is None:
            raise InitializationError("Either XAuth or facebook token must be set")

        self._api = api.TinderAPI(XAuthToken, proxies)
        # perform authentication
        if XAuthToken is None:
            self._api.auth(facebook_id, facebook_token)
Esempio n. 2
0
    def __init__(self,
                 facebook_token=None,
                 XAuthToken=None,
                 proxies=None,
                 facebook_id=None,
                 cert=None):
        if facebook_token is None and XAuthToken is None:
            raise InitializationError(
                "Either XAuth or facebook token must be set")

        self._api = api.TinderAPI(XAuthToken, proxies)
        if proxies is not None:
            self._api._session.cert = cert
            self._api._session.verify = False
        # perform authentication
        if XAuthToken is None:
            self._api.auth(facebook_id, facebook_token)