Facebook Connector FAQ
    • Dark
      Light

    Facebook Connector FAQ

    • Dark
      Light

    Article Summary

    Selecting an API version

    When using the Facebook Query component, always make sure you're using the latest version of Matillion ETL, since the Facebook driver gets frequently updated.

    If you need to use a specific API version, add a Connection Option named Version and set its value to a valid decimal or integer without quotes or punctuation, for example 2.12 or 3.1.


    Authentication problems

    To authenticate successfully, you must have Facebook OAuth credentials, with appropriate scopes enabled. Read Facebook Authentication Guide for a step-by-step guide.

    To successfully set up OAuth for Facebook, you must be accessing Matillion ETL over HTTPS (not HTTP). Read SSL for more information about configuring HTTPS.


    Error message: "An unknown error occurred"

    This error message can be thrown by Facebook APIs under two common circumstances:

    1. When versions become deprecated (see above).
    2. ​When the API call tried to retrieve too much data.

    If you are using the latest version of Matillion ETL and still receive "An unknown error occurred", try restricting the data volumes, for example by reducing the date range in the query. Note that setting the "limit" property of the component probably won't make any difference in this respect.

    It might also be possible to use the asynchronous API. In Advanced Mode, try adding a predicate on UseAsync, for example:

    SELECT ... FROM AdInsights
    WHERE UseAsync=True
    

    Error message: "You are calling a deprecated version"

    Occasionally Facebook APIs will throw this more specific error due to version deprecation. It's the same underlying problem as the "An unknown error occurred" listed above.


    Error message: "A target must be specified"

    Almost all of the Facebook data sources require you to provide a "Target" in the query. The "Target" depends upon the context, and might for example be a Page, an Ad, an AdSet or a Campaign. You specify the target by adding an equality predicate on "Target" inside the Data Source Filter property on the component. For example:

    Data Source Filter property


    Data discrepancies

    Within Business Manager, it's possible that when you refresh a report for a specific date range, there will sometimes be a discrepancy between the old and new results.

    This is a feature of Facebook, and you may find the same thing happening with the Matillion ETL Facebook Query because it uses the same APIs.


    Specifying date ranges

    Some Facebook queries allow you to specify date ranges, for example using DateStart and DateEnd. The date format is DD/MM/YYYY for these. Incorrect date formats can sometimes result in errors such as "Cannot compare data type of class java.lang.Double to class java.util.Date"

    Some Facebook queries allow you to specify magic strings for date ranges such as DatePreset = 'yesterday'.


    Querying authenticated as page

    You can set a connection option for this with the parameter AuthenticateAsPage and the Value set to the Page ID.


    What's Next