generateCustomerTokenFromFacebook()


Allows to create customerToken when it expires or gets lost (by cookies deletion or browser change) with the use of customer's Facebook ID. Customer has to be created prior by prepareRemoteAuth method or registerCustomer method.

Info: Enterprise account required. Contact us if you're interested about opening Enterprise account.

Parameters:

Name Type Description
publisherToken string Your publisher token. To open enterprise account contact us.
facebookId string FacebookId of customer to generate Token.

- required parameter

Response Parameters:

Name Type Description
token string Customer token used to identify the user

Request:

[
    {
        "method": "generateCustomerTokenFromFacebook",
        "params": {
            "publisherToken": "XIrx-SjTLVMCsaRSOf2q2hvWKOlrf57yHknDRRRMX-13FzQx",
            "facebookId": "123456789012345"
        },
        "jsonrpc": "2.0",
        "id": 1
    }
]

Response:

[
    {
        "result": {
            "token": "luvnRyrO4ep2mlRvHzDIHy0P-XN4gEpPOLaopQyj28AzpSDb"
        },
        "id": "1",
        "jsonrpc": "2.0"
    }
]

Remember! you can always check it by yourself using API Console - generateCustomerTokenFromFacebook()

Back to Customer API