Facebook Developers
DocsToolsSupportNewsApps
Log In
  • Social Plugins
  • Facebook Login
  • Open Graph
  • Facebook APIs
    • Graph API
    • FQL
    • Open Graph
    • Dialogs
    • Chat
    • Internationalization
    • Ads
  • Games
  • Payments
  • App Center
  • Promote Your App
  • iOS
  • Android
  • JavaScript
  • PHP
  • More SDKs
  • Best Practices
    • Batch Requests
    • Using ETags
  • Reference
    • Cost Per Action (CPA) Ads
    • Currencies
    • Introduction to Action Spec
    • Introduction to Sponsored Stories
    • Mobile App Install Ads
    • Optimized CPM
    • Real Time Bidded Exchange protocol
    • Sponsored Results
    • Thrift file for Real Time Bidded Exchange protocol
  • Specs
    • Conversion Specs
    • Creative Specs
    • Defining Action Specs
    • Targeting Specs
    • Tracking Specs
  • Advanced Targeting
    • Action Spec Targeting
    • Conversion pixels
    • Custom Audience targeting
    • Topic Targeting
    • ZIP Code Targeting
  • Queries
    • Action Estimate
    • Action Spec Ad Previews
    • Ad Statistics
    • Autocomplete Data
    • Broad Target Categories
    • Connection Objects
    • Conversion Stats
    • Keyword Stats
    • Partner Categories
    • Reach estimate
    • Targeting Description
  • Objects
    • Ad account
    • Ad account group
    • Ad campaign
    • Ad creative
    • Ad group
    • Ad image
    • Ad user

Connection Objects

Facebook APIs › Ads › Connection Objects

Connection Objects are the Facebook objects (e.g. pages, apps, etc) which the Ad user is an administrator of (or developer/advertiser in the case of apps). By being an administrator of these objects they have the exclusive right to target users based on their connection to this object. E.g. only a Page Administrator can target ads at the fans of their page.

Note: Facebook objects are linked at a Ad user level rather than an Ad account level.

Each object ID has an associated type field. The object types that can be returned in the type field are the following:

  • 1 Page
  • 2 Application
  • 3 Events
  • 6 Place
  • 7 Domains

Query Result Fields

Name Description Permissions Returns
id The ID of the Facebook object ads_management long
name The name of the Facebook Object ads_management string
url The URL of the Facebook object ads_management string
type The type of the Facebook object ads_management int
og_namespace The namespace of the Facebook application object (if any) ads_management string
og_actions If the Facebook object is an application, an array of Open Graph actions it implements (if any) ads_management array of array
og_objects If the Facebook object is an application, an array of Open Graph objects it implements (if any) ads_management array of array
supported_platforms If the Facebook object is an application, an array of integers representing which platforms are supported by the app. See below for the specific values and what they represent ads_management array of int
tabs An array of links to the tabs of the page if the object is a Facebook page ads_management array of string
picture A link to the picture that corresponds to the object ads_management string

Supported Platforms

The values of supported_platform for applications are:

Value Description
1 Website with FB Login
2 Page Tab
3 Mobile Web
4 Native iOS (with iPhone store ID)
5 Native iOS (with iPad store ID)
6 Native Android (with package and class name)

Querying connection objects

Querying the the connection objects of an account

To query the Facebook objects associated with a Ad user, query the connectionobjects connection on the Ad account:

act_AccountID/connectionobjects?access_token=___

Specifically, this call returns the IDs of all objects for which the current session user is an administrator, and the IDs of apps for which the user is listed as a developer or advertiser.

Below is an example of a response:

{
  "data": [
    {
     "id": "157735000934788",
     "name": "Park Circa: shared parking",
     "url": "https://www.facebook.com/parkcirca",
     "type": 1,
     "tabs": {
        "https://www.facebook.com/parkcirca?sk=wall": "Wall",
        "https://www.facebook.com/parkcirca?sk=info": "Info",
        "https://www.facebook.com/parkcirca?sk=friendactivity": "Friend Activity",
        "https://www.facebook.com/parkcirca?sk=page_insights": "Insights",
        "https://www.facebook.com/parkcirca?sk=photos": "Photos",
        "https://www.facebook.com/parkcirca?sk=app_245215242180664": "Monthly Parking"
     },
     "picture": "http://___"
  },
  {
     "id": "103535956430311",
     "name": "TestApp",
     "url": "https://apps.facebook.com/___/",
     "type": 2,
     "tabs": [

     ],
     "picture": "https://___"
  },
  {
     "id": "245215242180664",
     "name": "Monthly Parking",
     "url": "https://www.facebook.com/apps/application.php?id=___",
     "type": 2,
     "tabs": [

     ],
     "picture": "https://___"
  },
 ],
 "count": 22,
 "limit": 500,
 "offset": 0,
 "paging": {
    "next": "https://graph.facebook.com/act_<ACCOUNT_ID>/connectionobjects?access_token=___&offset=500"
 }
} 

Below is an example of a Facebook application response:

{
  "id": "6350929420",
  "name": "SMP",  
  "url": "https://apps.facebook.com/smplatform/",
  "type": 2,
  "og_namespace": "smplatform",
  "og_actions": [
    {
      "name": "apps.uses",
      "display_name": "Use",
      "properties": [
        {
          "name": "start_time",
          "type": "date_time"
        },
        {
          "name": "end_time",
          "type": "date_time"
        },
        ...
        {
          "name": "place",
          "type": "place"
        }
      ],
      "connected_objects": [
        "website"
      ]
    },      
    {
      "name": "smplatform:cook",
      "display_name": "Cook",
      "properties": [
        {
          "name": "start_time",
          "type": "date_time"
        },
        ...
        {
          "name": "explicitly_shared",
          "type": "boolean"
        }
      ],
      "connected_objects": [
        "recipe"
      ]
    }
  ],
  "og_objects": [
    {
      "name": "website",
      "display_name": "Link",
      "properties": [
        {
          "name": "url",
          "type": "url"
        },
        ...
        {
          "name": "see_also",
          "type": "url"
        }
      ]
    },
    {
      "name": "recipe",
      "display_name": "challenge",
      "properties": [
        {
          "name": "type",
          "type": "string"
        },
        {
          "name": "determiner",
          "type": "enum"
        }
        ...
      ]
    }
  ],
  "supported_platforms": [
    1, // Website with FB Login
    2, // Page Tab
    3, // Mobile Web
    4, // Native iOS (with iPhone store ID)
    5, // Native iOS (with iPad store ID)
    6, // Native Android (with package and class name)
  ],
  "tabs": [
  ],
  "picture": "https://__"
},
...
Updated about 5 months ago
Facebook © 2013 · English (US)
AboutAdvertisingCareersPlatform PoliciesPrivacy Policy