facebook.*

Type Library
Revision Current Public Release (2014.2511)
Keywords facebook
See also Facebook Portal Setup
Implementing Facebook

Overview

The facebook library provides access to Facebook Connect, a set of web APIs for accessing the Facebook social network. The functions allow a user to login/logout, post messages/images, and retrieve status.

You must ensure your app works properly with single-sign-on (SSO). Please read the Facebook Portal Setup guide for more information on how to implement single-sign-on in your Facebook-enabled apps.

Simulator

In the Corona Simulator, the APIs in this library do nothing. They are only functional on iOS and Android devices, as well as the Xcode iOS Simulator.

Gotchas

Build 2165+

As of Corona SDK Build #2165 (2014.2165), Facebook for iOS was removed from the core and is now implemented via a plugin. If you're using this build or later and you're targeting iOS, you must include the following in the build.settings file.

settings = {

    plugins =
    {
        ["facebook"] =
        {
            publisherId = "com.coronalabs",
            supportedPlatforms = { iphone=true, ["iphone-sim"]=true }
        },
    },
}

Build 2430+

As of Corona SDK Build #2430 (2014.2430), Facebook for Android was removed from the core and is now implemented via a plugin. If you're using this build or later and you're targeting Android, you must include the following in the build.settings file. Note that the supportedPlatforms line has been removed in this case for cross-platform compatibility.

settings = {

    plugins =
    {
        ["facebook"] =
        {
            publisherId = "com.coronalabs"
        },
    },
}

Functions

Properties

Useful Resources