background preloader

Definition objets

Facebook Twitter

Internationalization. What follows assumes you've already started an app using the App Dashboard, and that you already have an App ID. Approved apps created in the App Dashboard are displayed in the Facebook App Center in the primary language for the app. To display the app in other locales/languages, you have to make some changes to it in the App Dashboard. That is, if you create your app using the English (U.S.) locale, the App Center will display its details (its tagline, description, detailed description and explanations about requested permissions) about it only in English, no matter who is using the App Center. If you want to enable people in France or Germany to read app details in French or German, you can select them as target languages and provide text strings in those languages in the App Dashboard. Making your app available this way in other locales helps you boost its reach. To make your app details available in languages other than its primary language, here's what to do:

Open Graph Internationalization. Self-Hosted Open Graph Objects are annotated web pages with a set of meta tags that provide property values. Object properties include the title, description and any custom properties. Objects are connected to people using apps via actions, and when this happens, an object appears in timeline, news feed and ticker. Object property values can be stored in multiple languages.

To make sure your object is scraped in multiple languages, make sure to do either of the following: Call the Graph API to update the object URL with the locale parameter.Specify an array of og:locale:alternate meta tags to define which locales you support. The Open Graph Object Crawler will include fb_locale parameter in the URL (for example, ? To take advantage of this, start by adding the og:locale meta tag markup to your web pages. The og:url and og:type in the meta data must be the same regardless of the fb_locale parameter.

Crawl in English: The Open Graph protocol. Using Actions. To publish an action, make an HTTP POST to the following Graph API endpoint: /{user-id}/{action-type} This call should be signed with a user access token with publish_actions permission or with an app access token for a user who was previously logged in. For common actions, the {action-type} is the name of the action, such as og.likes: /{user-id}/og.likes For custom actions, it is a composite of the app namespace and the custom action type: The namespace is unique to your app, and is set in your app's dashboard on the Basic tab. Parameters The following parameters are used when publishing an action, any custom action properties should also be included when publishing. Example POST /me/cookbook:eat? Capabilities Capabilities are additional API features for actions; they are optional but enabling them requires additional review during the approval process before they can be used by people who aren't developers or testers of the app (see Guidelines for Action Capabilities): POST /me/cookbook:eat?

Using Objects. In this section we cover self-hosted objects. Self-hosted objects are represented by HTML markup on a particular URL which uniquely defines each object. You can implement one of the predefined objects or define your own objects to represent important things in your app that will be used with actions. Using self-hosted objects requires that you host them as pages on your own web server and all self-hosted objects are public.

To learn more about creating objects hosted on Facebook's servers with Facebook's Object API, please see our documentation on Using the Object API. Objects created with the Object API can be public or private and are likely to be more useful for people building a mobile-only application. Learn how to localize self-hosted objects in our documentation on localizing open graph stories. Creating Objects Self-hosted Objects are simply HTML pages that contain the necessary descriptive information, in the form of Open Graph meta tags. Including your Object Meta Tags Source URL: Define Actions. Define Objects.