Sei sulla pagina 1di 112

CARA FEDERICO

PROYECTO FINAL - 2011

Anexos
DUZAN LEANDRO

LIBERAL MATIAS

POROLLI MATIAS

ZANUSO FRANCO
Ingeniería en Sistemas de Información PROYECTO - 2011

Contenido
Objects..........................................................................................................................................7
Album........................................................................................................................................7
Ejemplo..................................................................................................................................7
Propiedades...........................................................................................................................7
Conexiones............................................................................................................................7
Editorial.................................................................................................................................8
Application................................................................................................................................8
Ejemplo.................................................................................................................................8
Propiedades...........................................................................................................................8
Conexiones............................................................................................................................9
Checkin....................................................................................................................................10
Propiedades.........................................................................................................................10
Editorial................................................................................................................................11
Comment.................................................................................................................................11
Ejemplo................................................................................................................................11
Propiedades.........................................................................................................................12
Conexiones..........................................................................................................................12
Editorial...............................................................................................................................12
Domain....................................................................................................................................12
Example...............................................................................................................................12
Propiedades.........................................................................................................................13
Event.......................................................................................................................................13
Ejemplo................................................................................................................................13
Propiedades.........................................................................................................................13
Conexiones..........................................................................................................................14
Editorial...............................................................................................................................15
FriendList.................................................................................................................................15
Ejemplo................................................................................................................................15

Cara - Duzan - Liberal - Porolli - Zanuso 1/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Propiedades.........................................................................................................................15
Conexiones..........................................................................................................................15
Editorial...............................................................................................................................16
Group......................................................................................................................................16
Ejemplo...............................................................................................................................16
Propiedades.........................................................................................................................16
Conexiones...........................................................................................................................17
Editorial................................................................................................................................17
Insights....................................................................................................................................17
Ejemplo................................................................................................................................18
Propiedades.........................................................................................................................18
Link..........................................................................................................................................18
Ejemplo................................................................................................................................18
Propiedades.........................................................................................................................18
Conexiones..........................................................................................................................19
Editorial...............................................................................................................................19
Message..................................................................................................................................19
Propiedades.........................................................................................................................20
Conexiones..........................................................................................................................20
Note........................................................................................................................................21
Ejemplo................................................................................................................................21
Propiedades.........................................................................................................................21
Conexiones..........................................................................................................................21
Editorial...............................................................................................................................21
Page........................................................................................................................................22
Ejemplo...................................................................................................................................22
Propiedades.........................................................................................................................22
Conexiones..........................................................................................................................22
Photo.......................................................................................................................................23
Ejemplo................................................................................................................................23
Propiedades.........................................................................................................................23

Cara - Duzan - Liberal - Porolli - Zanuso 2/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Conexiones..........................................................................................................................24
Editorial...............................................................................................................................25
Post.........................................................................................................................................25
Ejemplo...............................................................................................................................25
Propiedades.........................................................................................................................26
Conexiones..........................................................................................................................28
Editorial...............................................................................................................................28
Review.....................................................................................................................................29
Ejemplo...............................................................................................................................29
Propiedades.........................................................................................................................29
Status message........................................................................................................................30
Ejemplo................................................................................................................................30
Propiedades.........................................................................................................................30
Conexiones..........................................................................................................................30
Editorial...............................................................................................................................30
Subscription.............................................................................................................................31
Ejemplo................................................................................................................................31
Propiedades.........................................................................................................................31
Editorial...............................................................................................................................31
Thread.....................................................................................................................................32
Propiedades.........................................................................................................................32
Conexiones..........................................................................................................................32
User.........................................................................................................................................33
Ejemplo................................................................................................................................33
Propiedades.........................................................................................................................33
Conexiones..........................................................................................................................36
Video.......................................................................................................................................38
Example...............................................................................................................................39
Publishing............................................................................................................................39
Propiedades.........................................................................................................................39
Conexiones..........................................................................................................................40

Cara - Duzan - Liberal - Porolli - Zanuso 3/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Tópicos avanzados......................................................................................................................42
Dialogs....................................................................................................................................42
Dialog URLs.........................................................................................................................42
Common Parameters...........................................................................................................43
Display Modes......................................................................................................................43
Mobile Display Modes..........................................................................................................44
Dialogs.................................................................................................................................45
FQL.........................................................................................................................................46
Tables..................................................................................................................................47
Internationalization API...........................................................................................................52
Internationalizing your Application......................................................................................53
Preparing Your Application for Translation..........................................................................54
Registering the Text You Want Translated...........................................................................55
Marking Up Text for Translation..........................................................................................56
Getting Your Application Translated....................................................................................57
Managing the Translation Process.......................................................................................59
Credits API...............................................................................................................................64
API Overview.......................................................................................................................64
Setting Up Your Application.................................................................................................65
Best Practices Guide............................................................................................................66
Creating your Callback.........................................................................................................66
Payment Prompt..................................................................................................................67
Get More Credits.................................................................................................................68
Earning Credits Using Offers................................................................................................69
Earning Credits Using DealSpot...........................................................................................70
Get Balance..........................................................................................................................71
Gamer Status.......................................................................................................................71
Buy with Friends...................................................................................................................72
Frictionless Payments...........................................................................................................73
Credits Graph API.................................................................................................................74
Get Order.............................................................................................................................75

Cara - Duzan - Liberal - Porolli - Zanuso 4/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Update Order.......................................................................................................................76
Get Orders...........................................................................................................................76
Application Callbacks...........................................................................................................78
Reporting.............................................................................................................................79
Dispute Resolution...............................................................................................................82
Chargebacks........................................................................................................................83
Refund Reason Codes (GET to /[order id] API)......................................................................83
Error Codes..........................................................................................................................84
Ads API....................................................................................................................................88
Getting Started....................................................................................................................88
Ads API Best Practices.........................................................................................................91
Ads API Methods and Structures..........................................................................................91
Chat API...................................................................................................................................93
Features and Limitations......................................................................................................93
Configuring Chat Authentication.........................................................................................94
Best Practices......................................................................................................................96
Platform Authentication Sample Code................................................................................96
Política de privacidad de Facebook............................................................................................100
1. Introducción.......................................................................................................................100
2. Información que recibimos.................................................................................................102
3. Compartir información en Facebook..................................................................................104
4. Información que compartes con terceros...........................................................................106
5. Cómo utilizamos tu información.........................................................................................108
6. Cómo compartimos la información.....................................................................................110
7. Cómo puedes cambiar eliminar información.......................................................................112
8. Cómo protegemos la información.......................................................................................113
9. Otras condiciones...............................................................................................................114

Cara - Duzan - Liberal - Porolli - Zanuso 5/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011

Introducción
En los anexos presentaremos información que puede llegar a resultar útil para las siguientes
etapas posteriores al relevamiento, detalles muy específicos de conceptos mencionados y
explicados en el relevamiento detallado y políticas de privacidad de Facebook.

Cara - Duzan - Liberal - Porolli - Zanuso 6/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011

Objects

Album

A photo album

Ejemplo

https://graph.facebook.com/99394368305 (Coca-Cola fan page wall photos)

Propiedades
Name Description Permissions Returns

id
The photo album ID Publicly available A JSON string
from The profile that created A JSON object containing
Publicly available
this album the id and name fields
name
The title of the album Publicly available A JSON string
Available to
message The description of the
everyone in A JSON string
album
Facebook
Available to
location
The location of the album everyone on A JSON string
Facebook
link A link to this album on A JSON string containing a
Publicly available
Facebook valid URL
Available to
privacy The privacy settings for
everyone on A JSON string
the album
Facebook
count The number of photos in
Publicly available A JSON string
this album
created_time The time the photo album A JSON string containing a
Publicly available
was initially created IETF RFC 3339 datetime
updated_time The last time the photo A JSON string containing a
Publicly available
album was updated IETF RFC 3339 datetime
Conexiones
Name Description Permissions Returns

photos The photos contained Publicly


An array of Photo objects
in this album available
comments The comments made Publicly An array of JSON objects containing id,

Cara - Duzan - Liberal - Porolli - Zanuso 7/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
on this album available from, message and created_time fields
picture The album's cover Publicly An HTTP 302 with the URL of the album's
photo available cover picture
Editorial

Requires the publish_stream permission.

To create a new, empty photo album, POST the album name and optional description to
http://graph.facebook.com/PROFILE_ID/albums.

Check out the Photo documentation for more information about publishing photos to
albums.

curl -F 'access_token=...' \
-F 'name=My new photo album' \
-F 'message=My photo album description' \
https://graph.facebook.com/me/albums

Application

An application registered on Facebook Platform. The Graph API supports querying for
information on existing applications. To create, administer or delete applications developers
must go to the Developer Application.

Ejemplo

https://graph.facebook.com/2439131959 (The Graffiti Application)

Propiedades
Name Description Permissions Returns

Id Publicly
The application ID A JSON string
available
name Publicly
The title of the application A JSON string
available
description The description of the application Publicly
A JSON string
written by the 3rd party developers available
category Publicly
The category of the application A JSON string
available
link A link to application dashboard on Publicly A JSON string
Facebook available containing a valid URL

Cara - Duzan - Liberal - Porolli - Zanuso 8/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Conexiones
Name Description Permissions Returns

feed Publicly
The application's wall An array of Post objects
available
posts Publicly
The applications's own posts An array of Post objects
available
The application's logo with
maximum dimensions of An HTTP 302 with the
picture Publicly
75x75 pixels suitable for location set to the picture
available
embedding as the source of an URL
image tag
The photos, videos, and posts
tagged Publicly An array of Post, Photo or
in which this application has
available Video objects
been tagged
links Publicly
The application's posted links An array of Link objects
available
photos The photos this application Publicly
An array of Photo objects
has uploaded available
albums The photo albums this page Publicly
An array of Album objects
has created available
statuses The application's status Publicly An array of Status
updates available message objects
videos The videos this application has Publicly
An array of Video objects
created available
notes Publicly
The application's notes An array of Note objects
available
events The events this page is Publicly
An array of Event objects
managing available
All of the subscriptions this Requires an
subscriptions An array of Subscription
application has for real-time application
objects
notifications access token
Requires an
insights Usage metrics for this An array of Insight
application
application objects
access token
An array of JSON objects
Requires an containing id,
accounts Test User accounts associated
application access_token and
with the application
access token login_url for the test
users
reviews Publicly
Reviews of this application An array of Review objects
available

Cara - Duzan - Liberal - Porolli - Zanuso 9/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011

Checkin

A checkin made through Facebook Places or the Graph API.

You can search, read and publish checkins. Every checkin is associated with a checkin ID
that represents an object in the graph. These checkins are then associated with locations
represented by Facebook Pages or Open Graph protocol pages.

To get a user's checkins, request the user_checkins extended permission. To see the user's
friends' checkins, request the friends_checkins extended permission.

You can GET individual check-ins by passing the checkin ID:

GET https://graph.facebook.com/[checkin_id]

Or you can GET checkin information from individual places or users:

GET https://graph.facebook.com/[user id]/checkins


GET https://graph.facebook.com/[page id]/checkins

You can search for recent checkins for an authorized user and his or her friends:

GET https://graph.facebook.com/search?
type=checkin&access_token=ACCESS_TOKEN

You can search for places near a specific location (distance is in meters):

GET https://graph.facebook.com/search?
q=pizza&type=place&center=lat,long&distance=1000

Propiedades
Name Description Permissions Returns

id
The checkin ID user_checkins JSON string
A JSON object containing the
from The ID and name of the user user_checkins
name and Facebook id of the
who made the checkin
user who made the checkin
tags The users the author tagged user_checkins Contains in data a list of the
in the checkin users tagged in this checkin
Information about the
place Facebook Page that user_checkins
A JSON object containing the
represents the location of the Page id, name, and location
checkin

Cara - Duzan - Liberal - Porolli - Zanuso 10/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
message The message the user added user_checkins
JSON string
to the checkin
Information about the A JSON object that contains
application
application that made the user_checkins the name and id of the
checkin application
created_time The time the checkin was A JSON string containing a
user_checkins
created IETF RFC 3339 datetime
Editorial

Requires the publish_checkins permission.

To publish a checkin, POST the user coordinates and the Place ID and optionally add
attachments like link, picture etc. similar to Post to the checkins of the user, i.e.,
http://graph.facebook.com/PROFILE_ID/checkins.

curl -F 'access_token=...' \
-F 'message=The coffee is just meh.' \
-F 'place=PAGE_ID' \
-F 'coordinates={"latitude":"...", "longitude": "..."}' \
-F 'tags=USER_ID1, USER_ID2' \
https://graph.facebook.com/me/checkins

Comment

A comment on a Graph API object

Ejemplo

https://graph.facebook.com/19292868552_475058873552_14173716 (A comment on Post)

Propiedades
Name Description Permissions Returns

id The Facebook ID of Available to everyone


A JSON string
the comment on Facebook by default
created_time The timedate the Available to everyone A JSON string containing a
comment was created on Facebook by default IETF RFC 3339 datetime
message Available to everyone
The comment text A JSON string
on Facebook by default
A JSON object containing
from The user that created Available to everyone
the id and name of the
the comment on Facebook by default
creating user

Cara - Duzan - Liberal - Porolli - Zanuso 11/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
The number of times
likes Available to everyone
this comment was A JSON integer
on Facebook by default
liked
Conexiones
Name Description Permissions Returns

An array of JSON objects containing id


likes All of the likes on Available to everyone
and name fields of the user that liked the
this comment on Facebook by default
comment
Editorial

Requires the publish_stream permission.

You can like a comment by issuing a POST to https://graph.facebook.com/[COMMENT


ID]/likes. To delete a like on a comment, issue a DELETE to
https://graph.facebook.com/[COMMENT ID]/likes.

curl -F 'access_token=...' \
https://graph.facebook.com/19292868552_475058873552_14173716/likes

Domain

A web site domain within the Graph API.

Example

http://graph.facebook.com?domain=www.facebook.com
http://graph.facebook.com?domains=www.facebook.com,www.example.com

Propiedades
Name Description Permissions Returns

id
The id of the domain Publicly available A JSON string
name
The name of the domain Publicly available A JSON string

Event

A Facebook event

Specifies information about an event, including the location, event name, and which
invitees plan to attend. The following examples show how to create and edit an event:

Cara - Duzan - Liberal - Porolli - Zanuso 12/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Make an event:

curl -d "name=test&start_time=1272718027&location=someplace"
https://graph.facebook.com/PROFILE_ID/events

Edit its location:

curl -d "location=elsewhere" https://graph.facebook.com/113252725382372

RSVP to an Event

curl -d "access_token=XXX"
https://graph.facebook.com/EVENT_ID/{attending|maybe|declined}

Ejemplo

https://graph.facebook.com/331218348435 (Facebook Developer Garage Austin)

Propiedades
Name Description Permissions Returns

id Publicly
The event ID A JSON string
available
owner The profile that Publicly A JSON object containing id and name
created the event available fields
name Publicly
The event title A JSON string
available
The long-form
description Publicly
description of the A JSON string
available
event
A JSON string containing an ISO-8601
The start time of the formatted date/time or a UNIX timestamp;
start_time event, as you want Publicly if it contains a time zone (not
it to be displayed available recommended), it will be converted to
on facebook Pacific time before being stored and
displayed
A JSON string containing an ISO-8601
The end time of the formatted date/time or a UNIX timestamp;
end_time event, as you want Publicly if it contains a time zone (not
it to be displayed available recommended), it will be converted to
on facebook Pacific time before being stored and
displayed
location The location for Publicly
A JSON string
this event available
venue The location of this Publicly A JSON object containing street, city,

Cara - Duzan - Liberal - Porolli - Zanuso 13/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
state, zip, country, latitude, and
event available
longitude fields
privacy The visibility of Publicly A JSON string containing 'OPEN',
this event available 'CLOSED', or 'SECRET'
updated_time The last time the Publicly A JSON string containing a IETF RFC
event was updated available 3339 datetime
Conexiones
Name Description Permissions Returns

feed Publicly
This event's wall An array of Post objects
available
All of the users who have
Available to A JSON array containing objects
noreply been not yet responded to
everyone on with id, name and rsvp_status
their invitation to this
Facebook fields
event
All of the users who have
Available to A JSON array containing objects
maybe been responded "Maybe"
everyone on with id, name and rsvp_status
to their invitation to this
Facebook fields
event
Available to A JSON array containing JSON
invited All of the users who have
everyone on objects with id, name and
been invited to this event
Facebook rsvp_status fields
Available to A JSON array containing objects
attending All of the users who are
everyone on with id, name and rsvp_status
attending this event
Facebook fields
All of the users who Available to A JSON array containing JSON
declined
declined their invitation to everyone on objects with id, name and
this event Facebook rsvp_status fields
Returns a HTTP 302 with the URL
picture Publicly of the event's picture (use ?
The event's profile picture
available type=small | normal | large to
request a different photo)
Editorial

Requires the create_event permission.

To publish an event, POST the event's title, start_time and end_time at


http://graph.facebook.com/PROFILE_ID/events.

curl -F 'access_token=...' \
-F 'name=My birthday' \
-F 'start_time=' \
-F 'end_time=' \

Cara - Duzan - Liberal - Porolli - Zanuso 14/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
https://graph.facebook.com/me/events

FriendList

A Facebook friend list

Ejemplo

https://graph.facebook.com/me/friendlists (Your friend lists)

Propiedades
Name Description Permissions Returns

id Requires the read_friendlist


The friend list ID A JSON string
permission
name Requires the read_friendlist
The name of the friend list A JSON string
permission
Conexiones
Name Description Permissions Returns

members All of the users who are Publicly An array of JSON objects containing
members of this list available friend id and name fields

Editorial

Requires the manage_friendlists permission.

You can create a new friendlist by issuing a POST to


https://graph.facebook.com/[User ID]/friendlists?name=[FriendList Name].
To add new members to a friendlist, issue a POST to
https://graph.facebook.com/[FriendList ID]/members/[USER ID].

You can delete a friend list by issuing a DELETE to


https://graph.facebook.com/[FriendList ID]. To delete a member of a list, issue a
DELETE to https://graph.facebook.com/[FriendList ID]/members/[USER ID].

curl -F 'access_token=...' \
https://graph.facebook.com/me/friendlists?name=old-school-friends

Cara - Duzan - Liberal - Porolli - Zanuso 15/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Group

A Facebook group

Ejemplo

https://graph.facebook.com/195466193802264 (Facebook Developers Group)

Propiedades
Name Description Permissions Returns

id Publicly
The group ID A JSON string
accessible
icon The URL for the Publicly A JSON string containing a valid
group's icon accessible URL
owner The profile that created Publicly A JSON object containing the id
this group accessible and name fields
name Publicly
The name of the group A JSON string
accessible
description A brief description of Publicly
A JSON string
the group accessible
link The URL for the Publicly A JSON string containing a valid
group's website accessible URL
privacy The privacy setting of Publicly A JSON string containing 'OPEN',
the group accessible 'CLOSED', or 'SECRET'
updated_time The last time the group Publicly A JSON string containing a IETF
was updated accessible RFC 3339 datetime
Conexiones
Name Description Permissions Returns

feed Publicly
This group's wall An array of Post objects
available
All of the users who are members An array of JSON objects
members Publicly
of this group (can only currently containing id, name, and
available
return the first 500 members) administrator fields
picture Publicly HTTP 302 with the URL of the
The profile picture of this group
available group's profile picture
docs Publicly
The docs in this group An array of Doc objects
available
Editorial

Requires the publish_stream permission.

Cara - Duzan - Liberal - Porolli - Zanuso 16/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
To publish to the Group's feed, POST a message and optional attachment to the feed
connection of the Group. See Post for more details and an example.

Insights

Statistics about applications, pages, and domains.

Available metrics include application and page hits, adds, removes, and likes. The FQL
Insights Documentation contains a complete list of available metrics.

Without a session, an application can retrieve only its own metrics. With a user session, it is
possible to retrieve data for all applications, pages, and domains owned by the session user.
Reading this data requires the read_insights permission.

Use Facebook Insights to claim your domain.

Insights can be retrieved only as an array.

Ejemplo

https://graph.facebook.com/2439131959/insights/application_active_users (Graffiti)

Propiedades
Name Description Permissions Returns

id
Requires
ID of the insight read_insight JSON string
permission
Requires
name
Name of the insight read_insight JSON string
permission
Length of the period Requires
period JSON string containing 'day', 'week' or
during which the read_insight
'month'
insights were collected permission
A JSON array of objects containing the
values Individual data points Requires
read_insight
value (a JSON number) and end_time
for the insight permission (A JSON string containing a IETF RFC
3339 datetime) fields

Cara - Duzan - Liberal - Porolli - Zanuso 17/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Link

A link shared on a user's wall

Ejemplo

https://graph.facebook.com/114961875194024 (A link shared by Arjun Banker)

Propiedades
Name Description Permissions Returns

id Publicly
The link ID A JSON string
accessible
from Publicly A JSON object containing
The user that created the link
accessible the id and name field
link Publicly A JSON object contain a
The URL that was shared
accessible valid URL
name Publicly
The name of the link A JSON string
accessible
caption The caption of the link (appears Publicly
A JSON string
beneath the link name) accessible
A description of the link
description Publicly
(appears beneath the link A JSON string
accessible
caption)
A URL to the link icon that
icon Publicly A JSON string containing a
Facebook displays in the news
accessible valid URL
feed
picture A URL to the thumbnail image Publicly A JSON string containing a
used in the link post accessible valid URL
message The optional message from the Publicly
A JSON string
user about this link accessible
created_time The time the message was Publicly A JSON string containing a
published accessible IETF RFC 3339 datetime
Conexiones
Name Description Permissions Returns

comments All of the comments Publicly An array of JSON objects containing id,
on this link available from, message and created_time fields

Editorial

Requires the publish_stream permission.

Cara - Duzan - Liberal - Porolli - Zanuso 18/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
To publish a wall post, POST the link, (optional) name, (optional) caption, (optional)
description and (optional) message to the feed/wall of the user or Page.

curl -F 'access_token=...' \
-F 'link=http://www.example.com/article.html' \
-F 'picture=http://www.example.com/article-thumbnail.jpg' \
-F 'name=Article Title' \
-F 'caption=Caption for the link' \
-F 'description=Longer description of the link' \
https://graph.facebook.com/me/feed

Message

A message in the new Facebook unified messaging system.

An individual message in the new Facebook messaging system. Every message has a
message ID that represents an object in the Graph. To get access to read a user's messages,
you should request the read_mailbox Extended Permission.

You can GET an individual message by specifying the message ID:

GET https://graph.facebook.com/[message_id]

Or you can GET all the messages in a thread:

GET https://graph.facebook.com/[thread_id]/messages

Propiedades
Name Description Permissions Returns

id The unique ID for this read_mailbox


JSON string
message
A JSON object that contains the
from The sender of this read_mailbox name, email and Facebook id (if
message
available) of the sender
A list of JSON objects, each of which
to A list of the message read_mailbox
contains the name, email and
recipients
Facebook id of the recipient
message The text of the read_mailbox JSON string
message
A timestamp of when
created_time A JSON string containing a IETF
this message was read_mailbox
RFC 3339 datetime
created
Conexiones
Name Description Permissions Returns

Cara - Duzan - Liberal - Porolli - Zanuso 19/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011

Contains in data a list of JSON objects each


attachments A list
of which have id, mime_type, name and size
read_mailbox
attachments
as fields
Contains in data a list of JSON objects each
shares A list of read_mailbox of which have id, link, name, description
attached shares
and picture as fields

Note

A Facebook note

Ejemplo

https://graph.facebook.com/122788341354 (The note announcing Facebook for iPhone 3.0)

Propiedades
Name Description Permissions Returns

id Available to everyone
The note ID A JSON string
on Facebook by default
from The profile that created Available to everyone A JSON object containing
the note on Facebook by default id and name fields
subject Available to everyone
The title of the note A JSON string
on Facebook by default
message Available to everyone A JSON string containing
The content of the note
on Facebook by default HTML text
created_time The time the note was Available to everyone A JSON string containing
initially published on Facebook by default a IETF RFC 3339 datetime
updated_time The time the note was Available to everyone A JSON string containing
last updated on Facebook by default a IETF RFC 3339 datetime
icon The icon that Facebook Available to everyone A JSON string containing
displays with notes on Facebook by default a valid URL
Conexiones
Name Description Permissions Returns

All of the A JSON array of objects with id,


comments Available to everyone
comments on this from, message and create_time
on Facebook by default
note fields
likes Users who like the Available to everyone A JSON array of objects with id

Cara - Duzan - Liberal - Porolli - Zanuso 20/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
note on Facebook by default and name fields

Editorial

Requires the publish_stream permission.

To publish a note, POST the subject and message fields to the profile (User or Page) at
http://graph.facebook.com/PROFILE_ID/notes.

curl -F 'access_token=...' \
-F 'subject=This is a note' \
-F 'message=Test note.' \
https://graph.facebook.com/me/notes

Page

A Facebook Page. This object supports Real-Time Updates for all properties except the
ones marked with a *. Also note that the properties below show the common properties of
all Pages. Pages in specific categories have additional fields depending on category.

Ejemplo

https://graph.facebook.com/platform (Facebook Platform)

Propiedades
Name Description Permissions Returns

id
The Page's ID Publicly available A JSON string
name
The Page's name Publicly available A JSON string
category
The Page's category Publicly available A JSON string
likes
* The number of users who like the Page Publicly available A JSON number

Conexiones
Name Description Permissions Returns

feed Available to everyone on


The Page's wall A JSON Array of post objects
Facebook
Returns a HTTP 302 with the
picture The Page's profile
Publicly available URL of the user's profile
picture
picture
The photos, videos, and
tagged An heterogeneous array of
posts in which this Page Publicly available
Photo, Video or Post objects
has been tagged

Cara - Duzan - Liberal - Porolli - Zanuso 21/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
links * The Page's posted Available to everyone on
An array of link objects
links Facebook
photos * The photos this Page
Publicly available An array of Photo objects
has uploaded
An array of JSON objects
groups * The groups this Page Available to everyone on containing group id,
is a member of Facebook version, name and unread
fields
albums * The photo albums this
Publicly available An array of Album objects
Page has created
statuses * The Page's status Available to everyone on An array of Status message
updates Facebook objects
videos * The videos this Page Available to everyone on
An array of Video objects
has created Facebook
notes Available to everyone on
* The Page's notes An array of Note objects
Facebook
posts
* The Page's own posts Publicly available An array of Post objects
events * The events this Page Available to everyone on
is attending Facebook
Checkins made by Requires
checkins
friends of the current friends_checkins An array of Checkin objects
session user permissions

Photo

An individual photo within an album

Ejemplo

https://graph.facebook.com/98423808305 (A photo from the Coke fan page)

Propiedades
Name Description Permissions Returns

Available to
id everyone on
The photo ID A JSON string
Facebook by
default
Available to
The profile (user or
from everyone on A JSON object containing id and
page) that posted this
Facebook by name fields
photo
default
tags The tagged users and Available to An array of JSON objects, the x

Cara - Duzan - Liberal - Porolli - Zanuso 22/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
everyone on and y coordinates are percentages
their positions in this
Facebook by from the left and top edges of the
photo
default photo, respectively
Available to
name The caption given to everyone on
A JSON string
this photo Facebook by
default
The icon that Available to
icon Facebook displays everyone on A JSON string contain a valid
when photos are Facebook by URL
published to the Feed default
Available to
source The full-sized source everyone on A JSON string contain a valid
of the photo Facebook by URL
default
Available to
height The height of the photo everyone on
A JSON number
in pixels Facebook by
default
Available to
width The width of the photo everyone on
A JSON number
in pixels Facebook by
default
Available to
link A link to the photo on everyone on A JSON string contain a valid
Facebook Facebook by URL
default
Available to
created_time The time the photo was everyone on A JSON string containing a IETF
initially published Facebook by RFC 3339 datetime
default
Available to
The last time the photo
updated_time everyone on A JSON string containing a IETF
or its caption was
Facebook by RFC 3339 datetime
updated
default
Conexiones
Name Description Permissions Returns

All of the An array of JSON objects containing


comments Available to everyone
comments on this id, from, message and
on Facebook by default
photo created_time fields
likes Users who like the Available to everyone An array of JSON objects containing
photo on Facebook by default id and name fields

Cara - Duzan - Liberal - Porolli - Zanuso 23/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
picture The album-sized Available to everyone An HTTP 302 with the location of
view of the photo on Facebook by default the picture URL
Editorial

Requires the publish_stream permission.

To publish a photo, issue a POST request with the photo file attachment as
multipart/form-data.

You can publish an individual photo to a user profile with a POST to


http://graph.facebook.com/PROFILE_ID/photos We automatically create an album for
your application if it does not already exist. All photos from your application will be
published to the same automatically created album.

You can publish a photo to a specific, existing photo album with a POST to
http://graph.facebook.com/ALBUM_ID/photos.

If you would like to suppress the story that is automatically generated in the user's feed
when you publish a photo (usually because you plan on generating your own), you can add
a no_story=1 parameter. In this case, the user will receive a notification that your
application has uploaded a photo.

curl -F 'access_token=...' \
-F 'source=@file.png' \
-F 'message=Caption for the photo' \
https://graph.facebook.com/me/photos

Post

An individual entry in a profile's feed. The read_stream extended permission is required


to access any information in a profile's feed that is not shared with everyone.

Ejemplo

https://graph.facebook.com/19292868552_118464504835613 (A post from Facebook


Platform)

Propiedades
Name Description Permissions Returns

id
The post ID read_stream JSON string
from Information read_stream A JSON object containing the name and
about the user Facebook id of the user who posted the
who posted the

Cara - Duzan - Liberal - Porolli - Zanuso 24/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
message message
Profiles
Contains in data a list of JSON objects,
to mentioned or read_stream each with the name and Facebook id of
targeted in this
the user
post
message
The message read_stream JSON string
If available, a
picture link to the picture read_stream
JSON string containing the URL
included with this
post
link The link attached read_stream
JSON string containing the URL
to this post
name The name of the read_stream
JSON string
link
The caption of
caption the link (appears read_stream
JSON string
beneath the link
name)
A description of
description the link (appears read_stream
JSON string
beneath the link
caption)
A URL to a Flash
movie or video
source
file to be read_stream JSON string containing the URL
embedded within
the post
A link to an icon
icon
representing the read_stream JSON string
type of this post
A string
indicating which
attribution
application was read_stream JSON string
used to create this
post
A list of available
actions on the
post (including
actions A list of JSON objects containing the
commenting, read_stream
'name' and 'link'
liking, and an
optional app-
specified action)
privacy The privacy Publicly A JSON object containing the value field

Cara - Duzan - Liberal - Porolli - Zanuso 25/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
settings of the accessible and optional friends, networks, allow
Post and deny fields.

The value field may specify one of the


following JSON strings: EVERYONE,
CUSTOM, ALL_FRIENDS,
NETWORKS_FRIENDS,
FRIENDS_OF_FRIENDS.

The friends field must be specified if


value is set to CUSTOM and contain one
of the following JSON strings:
EVERYONE, NETWORKS_FRIENDS
(when the object can be seen by networks
and friends), FRIENDS_OF_FRIENDS,
ALL_FRIENDS, SOME_FRIENDS,
SELF, or NO_FRIENDS (when the object
can be seen by a network only).

The networks field may contain a


comma-separated list of network IDs that
can see the object, or 1 for all of a user's
network.

The allow field must be specified when


the friends value is set to
SOME_FRIENDS and must specify a
comma-separated list of user IDs and
friend list IDs that 'can' see the post.

The deny field may be specified if the


friends field is set to SOME_FRIENDS
and must specify a comma-separated list
of user IDs and friend list IDs that 'cannot'
see the post.

Note: This privacy setting only applies to


posts to the current or specified user's own
Wall. Facebook ignores this setting for
targeted Wall posts (when the user is
writing on the Wall of a friend, Page,
event, group connected to the user).
Consistent with behavior on Facebook, all
targeted posts are viewable by anyone
who can see the target's Wall.

Cara - Duzan - Liberal - Porolli - Zanuso 26/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011

Privacy Policy: Any non-default privacy


setting must be intentionally chosen by
the user
The time the post
created_time A JSON string containing a IETF RFC
was initially read_stream
3339 datetime
published
The time of the
updated_time A JSON string containing a IETF RFC
last comment on read_stream
3339 datetime
this post
Location and
A JSON object containing comma
targeting language manage_pages separated lists of valid country , city ,
restrictions for
region and locale
Page posts only
Conexiones
Name Description Permissions Returns

All of the Available to An array of JSON objects containing


comments
comments on this everyone on id, from, message and created_time
post Facebook fields
Available to
likes The likes on this An array of JSON objects containing
everyone on
post the id and name fields
Facebook
Editorial

Requires the publish_stream permission.

 To publish a wall post, POST the message and optional attachment to the feed/wall of the
user, page or group, i.e., http://graph.facebook.com/PROFILE_ID/feed. When
publishing to a Page, to target a post to users in a specific location or language, use the
appropriate values from the following files: all cities (CSV), major cities (CSV), locales
(CSV), cities and locales (JSON).

curl -F 'access_token=...' \
-F 'message=Check out this funny article' \
-F 'link=http://www.example.com/article.html' \
-F 'picture=http://www.example.com/article-thumbnail.jpg' \
-F 'name=Article Title' \
-F 'caption=Caption for the link' \
-F 'description=Longer description of the link' \
-F 'actions={"name": "View on Zombo", "link":
"http://www.zombo.com"}' \
-F 'privacy={"value": "ALL_FRIENDS"}' \
-F 'targeting= {"countries":"US","regions":"6,53","locales":"6"}' \
https://graph.facebook.com/me/feed

Cara - Duzan - Liberal - Porolli - Zanuso 27/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Review

A review for an application

Ejemplo

https://graph.facebook.com/2345053339/reviews (An array of Reviews of the Facebook


Developer app)

Propiedades
Name Description Permissions Returns

id The Facebook ID of Available to everyone


A JSON string
the review on Facebook by default
created_time The timedate the Available to everyone A JSON string containing a
review was created on Facebook by default IETF RFC 3339 datetime
A JSON object containing
from The user that created Available to everyone
the id and name of the
the review on Facebook by default
creating user
message The review text Available to everyone
A JSON string
(optional) on Facebook by default
rating Available to everyone A JSON integer between 1
The review rating
on Facebook by default and 5
The application to A JSON object containing
to Available to everyone
which this review the id and name of the
on Facebook by default
applies application

Status message

A status message on a user's wall

Ejemplo

https://graph.facebook.com/367501354973 (A status message from Bret Taylor)

Propiedades
Name Description Permissions Returns

Publicly available to
id The status message
everyone on Facebook by A JSON string
ID
default
Publicly available to
from The user who posted A JSON object containing
everyone on Facebook by
the message id and name fields
default

Cara - Duzan - Liberal - Porolli - Zanuso 28/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Publicly available to
message The status message
everyone on Facebook by A JSON string
content
default
The time the Publicly available to A JSON string containing
updated_time
message was everyone on Facebook by a IETF RFC 3339
published default datetime
Conexiones
Name Description Permissions Returns

All of the Publicly available to An array of JSON objects


comments
comments on this everyone on Facebook containing id, from, message and
message by default created_time fields
Publicly available to
likes The users that have An array of JSON objects
everyone on Facebook
liked this message containing id and name
by default
Editorial

Requires the publish_stream permission.

To publish a status update, POST the message field to the feed/wall of the user whose status
you want to update, i.e., http://graph.facebook.com/USER_ID/feed.

curl -F 'access_token=...' \
-F 'message=This is my status update' \
https://graph.facebook.com/me/feed

Subscription

A subscription to an application to get real-time updates for an Graph object type. For more
details, see the Real-time Overview.

Ejemplo

https://graph.facebook.com/APP_ID/subscriptions (APP_NAME)

Propiedades
Name Description Permissions Returns

Available to
object The object type to subscribe A JSON string containing
everyone in
to code or permissions
Facebook by default
fields The list of fields for the Available to A JSON string containing
object type everyone in a comma-seperated list of

Cara - Duzan - Liberal - Porolli - Zanuso 29/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Facebook by default field names
An endpoint on your Available to
callback_url A JSON string containing
domain which can handle everyone in
a valid URL
the real-time notifications Facebook by default
Available to
active Whether or not the
everyone in A JSON boolean
subscription is active or not
Facebook by default
Editorial

To create a subscription, issue a POST request with the object, fields and callback_url
to the application/subscriptions connection.

curl https://graph.facebook.com/APP_ID/subscriptions \
-F 'access_token=...' \
-F 'object=user' \
-F 'fields=activities,friends,feed' \
-F 'callback_url=http://www.site.com/callback.php' \
-F \
'verify_token=a_secret_you_want_echoed'

Thread

A message thread in the new Facebook messaging system. Every thread has a thread ID
that represents an object in the Graph. To get access to read a user's threads, you should
request the read_mailbox Extended Permission. This is a read only API.

You can GET individual message threads by specifying the thread ID:

GET https://graph.facebook.com/[thread_id]

Or you can GET all the threads in a user's inbox:

GET https://graph.facebook.com/[user_id]/threads

You can also filter or query threads by tag or query terms:

GET https://graph.facebook.com/[user_id]/threads?q=hello
GET https://graph.facebook.com/[user_id]/threads?q=hello&tags=other

For a full list of tags, please see the unified_thread FQL table.

Propiedades
Name Description Permissions Returns

id The unique ID for this read_mailbox JSON string


message thread

Cara - Duzan - Liberal - Porolli - Zanuso 30/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
snippet Fragment of the thread for read_mailbox
JSON string
use in thread lists
updated_time Timestamp of when the A JSON string containing a
read_mailbox
thread was last updated IETF RFC 3339 datetime
message_count Number of messages in the read_mailbox An integer
thread
unread_count Number of unread messages read_mailbox
An integer
in the thread
tags
Thread tags read_mailbox A list of JSON strings

Conexiones
Name Description Permissions Returns

Contains in data a list of


JSON objects each of
participants A list of the thread read_mailbox which have name, email,
participants
and Facebook id (if
available) as fields
Contains in data a list of
A list of former thread
JSON objects each of
former_participants participants who have read_mailbox
which have name, email,
unsubscribed from the
and Facebook id (if
thread
available) as fields
Contains in data a list of
A list of participants JSON objects each of
senders
who have sent a read_mailbox which have name, email,
message in the thread and Facebook id (if
available) as fields
A list of the message
messages
objects contained in read_mailbox A list of message objects
this thread

User

A user profile. This object supports Real-Time Updates for all properties except the
verified property.

Ejemplo

https://graph.facebook.com/me (current user)

Propiedades
Name Description Permissions Returns

Cara - Duzan - Liberal - Porolli - Zanuso 31/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011

id The user's
Publicly available A JSON string
Facebook ID
name The user's
Publicly available A JSON string
full name
first_name The user's
Publicly available A JSON string
first name
last_name The user's
Publicly available A JSON string
last name
gender The user's
Publicly available A JSON string
gender
A JSON string
containing the
locale The user's
Publicly available ISO Language
locale
Code and ISO
Country Code
The URL of
A JSON string
link the profile for
Available to everyone on Facebook containing a
the user on
valid URL
Facebook
The user's
username
Facebook Publicly available A JSON string
username
An
anonymous,
third_party_id
but unique Available to everyone on Facebook A JSON string
identifier for
the user
The user's
timezone timezone A JSON
Available only for the current user
offset from number
UTC
The last time A JSON string
updated_time the user's containing a
Available to everyone on Facebook
profile was IETF RFC
updated 3339 datetime
The user's
verified account A JSON
Available to everyone on Facebook
verification boolean
status
The blurb
that appears Requires user_about_me or
about
friends_about_me permission
A JSON string
under the

Cara - Duzan - Liberal - Porolli - Zanuso 32/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
user's profile
picture
bio The user's
Requires the user_about_me A JSON string
biography
birthday The user's Requires user_birthday or A JSON string
birthday friends_birthday permission
An array of
A list of the
Requires user_education_history JSON objects
education user's
or friends_education_history containing
education
permission school, year
history
and type fields
The proxied
A JSON string
or contact
email containing a
email address Requires email permission
valid email
granted by
address
the user
A JSON object
hometown The user's Requires user_hometown or
containing name
hometown friends_hometown permission
and id
The genders Requires A JSON array
interested_in
the user is user_relationship_details or containing
interested in friends_relationship_details JSON strings
The user's A JSON object
location Requires user_location or
current containing name
friends_location permission
location and id
Requires user_religion_politics
political The user's
or friends_religion_politics A JSON string
political view
permission
The user's
quotes
favorite Requires the user_about_me A JSON string
quotes
The user's Requires user_relationships or
relationship_status
relationship friends_relationships A JSON string
status permission
Requires user_religion_politics
religion The user's
or friends_religion_politics A JSON string
religion
permission
Requires Returns a JSON
The user's
significant_other user_relationship_details or object
significant friends_relationship_details containing name
other permission and id
website The URL of Requires user_website or A JSON string
the user's friends_website permission containing a

Cara - Duzan - Liberal - Porolli - Zanuso 33/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
personal
valid URL
website
An array of
JSON objects
containing
A list of the employer,
work Requires user_work_history or
user's work location,
friends_work_history permission
history position,
start_date
and end_date
fields
Conexiones
Name Description Permissions Returns

Returns a HTTP 302


with the URL of the
user's profile picture
picture The user's
Publicly available (use ?type=small |
profile picture
normal | large to
request a different
photo)
An array of JSON
friends The user's objects containing
Available to everyone on Facebook
friends friend id and name
fields
If the manage_pages permission has
The Facebook An array of JSON
been granted, this connection also
accounts pages owned objects containing
yields access_tokens that can be used
by the current account id, category
to query the Graph API on behalf of
user and name field
the page
The user's
An array of app
apprequests outstanding This property can only be accessed
requests for the user
requests from with an app access token
within that app
an app
An array of JSON
The activities objects containing
activities Requires the user_activities or
listed on the activity id, name,
friends_activities permission
user's profile category and
create_time fields
The photo
albums albums this Requires the user_photos or An array of Album
user has friends_photos permission objects
created

Cara - Duzan - Liberal - Porolli - Zanuso 34/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
An array of JSON
The books objects containing
books Requires the user_likes or
listed on the book id, name,
friends_likes permission
user's profile category and
create_time fields
The places that
checkins the current user Requires the user_checkins or An array of Checkin
has checked- friends_checkins permissions objects
into
An array of JSON
objects containing
The events this
events Requires the user_events or event id, name,
user is
friends_events permission start_time,
attending
end_time, location
and rsvp_status
An array of Post
objects containing the
feed Requires the read_stream permission
The user's wall last 30 days or 50
to see non-public posts
posts, whichever is
greater
An array of JSON
friendlists The user's Requires read_friendlists to read objects containing id
friend lists & manage_friendlists to write and name fields of the
friendlist
An array of Post
objects containing the
home The user's
Requires the read_stream permission last 30 days or 50
news feed
posts, whichever is
greater
The threads in
inbox Requires the read_mailbox
this user's An array of threads
permission
inbox
An array of JSON
The interests objects containing
interests Requires the user_interests or
listed on the interest id, name,
friends_interests permission
user's profile category and
create_time fields
An array of JSON
All the pages objects containing
likes Requires the user_likes or
this user has like id, name,
friends_likes permission
liked category and
create_time fields
links The user's Requires the read_stream permission An array of Link

Cara - Duzan - Liberal - Porolli - Zanuso 35/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
posted links objects
An array of JSON
The movies objects containing
movies Requires the user_likes or
listed on the movie id, name,
friends_likes permission
user's profile category and
create_time fields
An array of JSON
The music objects containing
music Requires the user_likes or
listed on the music id, name,
friends_likes permission
user's profile category and
create_time fields
notes The user's An array of Note
Requires the read_stream permission
notes objects
The messages
outbox Requires the read_mailbox
in this user's An array of messages
permission
outbox
Requires the
The user's
user_photo_video_tags,
photos photos and/or An array of Photo
friends_photo_video_tags,
the photos the objects
user_photos or friends_photos
user is tagged
permissions
posts The user's own Requires the read_stream permission An array of Post
posts to see non-public posts objects
statuses The user's An array of Status
Requires the read_stream permission
status updates message objects
The photos,
videos, and An heterogeneous
tagged
posts in which Requires the read_stream permission array of Photo, Video
this user has or Post objects
been tagged
An array of JSON
The television objects containing
television Requires the user_likes or
listed on the television id, name,
friends_likes permission
user's profile category and
create_time fields
The updates in
updates Requires the read_mailbox
this user's An array of messages
permission
inbox
The videos this
videos Requires the user_videos or An array of Video
user has been
friends_videos permission objects
tagged in

Cara - Duzan - Liberal - Porolli - Zanuso 36/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Video

An individual video

Example

https://graph.facebook.com/614004947048 (A tech talk on Tornado)

Publishing

To publish a video, issue a POST request with the video file attachment as multipart/form-
data to https://graph-video.facebook.com/me/videos. Here’s a simple PHP example:

<?php
$app_id = "YOUR_APP_ID";
$app_secret = "YOUR_APP_SECRET";
$my_url = "YOUR_POST_LOGIN_URL";
$video_title = "YOUR_VIDEO_TITLE";
$video_desc = "YOUR_VIDEO_DESCRIPTION";

$code = $_REQUEST["code"];

if(empty($code)) {
$dialog_url = "http://www.facebook.com/dialog/oauth?client_id="
. $app_id . "&redirect_uri=" . urlencode($my_url)
. "&scope=publish_stream";
echo("<script>top.location.href='" . $dialog_url . "'</script>");
}

$token_url = "https://graph.facebook.com/oauth/access_token?client_id="
. $app_id . "&redirect_uri=" . urlencode($my_url)
. "&client_secret=" . $app_secret
. "&code=" . $code;
$access_token = file_get_contents($token_url);

$post_url = "https://graph-video.facebook.com/me/videos?"
. "title=" . $video_title. "&description=" . $video_desc
. "&". $access_token;

echo '<form enctype="multipart/form-data" action="'.$post_url.'


"method="POST">';
echo 'Please choose a file:';
echo '<input name="file" type="file">';
echo '<input type="submit" value="Upload" />';
echo '</form>';
?>

The video will be published to the uploader's own wall. Note that the URL has to be graph-
video.facebook.com, not graph.facebook.com.

Cara - Duzan - Liberal - Porolli - Zanuso 37/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Propiedades
Name Description Permissions Returns

Available to everyone
id
The video ID on Facebook by A JSON string
default
Available to everyone A JSON object
from The profile (user or page)
on Facebook by containing id and name
that created the video
default fields
Available to everyone An array of JSON
tags The users who are tagged in
on Facebook by objects containing id
this video
default and name fields
Available to everyone
name
The video title or caption on Facebook by A JSON string
default
The html element that may Available to everyone
embed_html A JSON string
be embedded in an Web page on Facebook by
containing a valid URL
to play the video default
The icon that Facebook Available to everyone
icon A JSON string
displays when video are on Facebook by
containing a valid URL
published to the Feed default
Available to everyone
source A URL to the raw, playable A JSON string
on Facebook by
video file containing a valid URL
default
Available to everyone A JSON string
created_time The time the video was
on Facebook by containing a IETF RFC
initially published
default 3339 datetime
Available to everyone A JSON string
updated_time The last time the video or its
on Facebook by containing a IETF RFC
caption were updated
default 3339 datetime
Conexiones
Name Description Permissions Returns

Available to everyone
likes All of the likes on this An array of JSON objects
on Facebook by
video containing id and name fields
default
Available to everyone An array of JSON objects
comments All of the comments on
on Facebook by containing id, from, message and
this video
default created_time fields
The image which Available to everyone
picture An HTTP 302 with the URL of the
represents the content on Facebook by
album's cover picture
of the video default

Cara - Duzan - Liberal - Porolli - Zanuso 38/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011

Cara - Duzan - Liberal - Porolli - Zanuso 39/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011

Tópicos avanzados

Dialogs

Dialogs provide a simple, consistent interface to display dialogs to users. Dialogs do not
require special user permissions because they require user interaction. Dialogs can be used
in any type of application, whether on Facebook.com, a website, or a mobile application.

You can integrate Dialogs into your application by constructing the URLs documented
below, or by using a helper method in one of the Facebook Platform SDKs:

 JavaScript SDK using the FB.ui method.


 iOS SDK using the dialog method.
 Android SDK using the dialog method.

Dialog URLs

Every dialog has a method name and parameters. The URL to a dialog always starts with

http://www.facebook.com/dialog/

followed by the name of the dialog and parameters. For example, to ask a user to post a
story to their Wall, send them to the Feed Dialog with required parameters:

http://www.facebook.com/dialog/feed?
app_id=123050457758183&
redirect_uri=http://www.example.com/response/

Click here to try the above URL yourself. The user will see a dialog that looks like below
(though the one below has extra parameters). If the user is not already logged into
Facebook, they will be asked to log in before being shown the dialog.

Cara - Duzan - Liberal - Porolli - Zanuso 40/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011

Common Parameters

All Platform Dialogs share a few common parameters:

Name Is Required Description


app_id Yes Your application identifier.
redirect_uri Yes
The URL to redirect to after the user clicks a button on the
Dialog.
Display mode in which to render the Dialog. Can be page,
display
No. Default popup, iframe, touch, or wap. If you specify iframe, you must
is page have a valid access_token. To get a valid access_token,
please see the Authentication guide

Display Modes

Platform Dialogs are all built to seamlessly run in a variety of display contexts on both the
web and mobile.

 page: By default, dialogs run in full-page mode with a Facebook header and footer.
This is appropriate for apps that do a full-page redirect in a normal desktop/laptop
web browser.
 popup: For use in a browser popup no bigger than 400px by 580px. Use this display
type to maintain context for the user while on an external website.

Cara - Duzan - Liberal - Porolli - Zanuso 41/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
 iframe: Display the dialog in a lightbox iframe on the current page. Because of the
risk of clickjacking, this is only allowed for some certain dialogs, and requires you
to pass a valid access_token.

On Facebook canvas pages, Dialogs are supported only for iframe applications. For FBML
applications, you can use some of the dialogs through specific FBJS methods.

Mobile Display Modes

To show a dialog to a user on a mobile device, change the subdomain of the dialog URL
from www to m. Facebook will default to an appropriate view based on the user agent. To
override that choice, you can explicitly specify one of two mobile display modes:

 touch: Used on smartphone mobile devices, like iPhone and Android. Use this for
tablets with small screens (i.e., under 7 inches) as well.
 wap: Display plain HTML (without JavaScript) on a small screen, such as a Nokia
7500.

E.g., the URL for a Feed dialog displayed on a touch device:

http://m.facebook.com/dialog/feed?
app_id=123050457758183&
redirect_uri=http://www.example.com/response/&
display=touch

With more parameters, this looks like:

Cara - Duzan - Liberal - Porolli - Zanuso 42/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011

Dialogs
Feed Dialog

Cara - Duzan - Liberal - Porolli - Zanuso 43/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Prompt the user to publish an individual story to a profile's feed

Friends Dialog

Prompt the user to add a friend.

OAuth Dialog

Prompt the user to authorize and grant your app permissions

Pay Dialog

Prompt a payment

Requests Dialog

Requests Dialog

FQL

Facebook Query Language, or FQL, enables you to use a SQL-style interface to query the
data exposed by the Graph API. It provides for some advanced features not available in the
Graph API, including batching multiple queries into a single call.

You can execute FQL queries by fetching


https://api.facebook.com/method/fql.query?query=QUERY. You can specify a
response format as either XML or JSON with the format query parameter.

Queries are of the form SELECT [fields] FROM [table] WHERE [conditions]. Unlike
SQL, the FQL FROM clause can contain only a single table. You can use the IN keyword in
SELECT or WHERE clauses to do subqueries, but the subqueries cannot reference variables in
the outer query's scope. Your query must also be indexable, meaning that it queries
properties that are marked as indexable in the documentation below.

FQL can handle simple math, basic boolean operators, AND or NOT logical operators, and
ORDER BY and LIMIT clauses.

For any query that takes a uid, you can pass me() to return the logged-in user. For
example:

SELECT name FROM user WHERE uid = me()

Other functions that are available are now(), strlen(), substr() and strpos().

Cara - Duzan - Liberal - Porolli - Zanuso 44/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Here's an example of a subquery that fetches all user information for the active user and
friends:

SELECT uid, name, pic_square FROM user WHERE uid = me()


OR uid IN (SELECT uid2 FROM friend WHERE uid1 = me())

For more information, check out the tables below, most of which have sample queries
demonstrating their use. Also check out the Performance Guide for tips on optimizing your
FQL.

Tables
album

Query this table to return information about a photo album.

application

Query this table to return read-only properties about an application.

checkin

Query this table to return information about a checkin. By default, this query returns the
last 20 checkins and returns a maximum of 500 checkins.

comment

Query this table to obtain comments associated with one or more fb:comments/Feed story
comment XIDs.

comments_info

The comments_info FQL table. Query this table to obtain XIDs for fb:comments objects
associated with an application ID.

connection

Query this table to return a user's friends and the Facebook Pages to which the user is
connected.

cookies

Query this table to return information about a cookie.

Cara - Duzan - Liberal - Porolli - Zanuso 45/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
developer

Query this table to return the application IDs for which the specified user is listed as a
developer in the Developer application.

domain

The domain table provides a read-only mapping between domain names and ids.

domain_admin

Query this table to return information about the admin of a domain.

event

Query this table to return information about an event.

event_member

Query this table to return information about a user's status for an event.

family

Query this table to return detailed information about a user's family.

friend

Query this table to determine whether two users are linked together as friends.

friend_request

Query this table either to determine which users have sent friend requests to the logged-in
user or to query whether a friend request has been sent from the logged-in user to a specific
user.

friendlist

Query this table to return any friend lists owned by the specified user.

friendlist_member

Query this table to determine which users are members of a friend list.

group

Cara - Duzan - Liberal - Porolli - Zanuso 46/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Query this table to return information about a group.

group_member

Query this table to return information about the members of a group.

insights

The insights table contains statistics about applications, pages and domains

like

Query this table to return the user IDs of users who like a given Facebook object (video,
note, link, photo, or photo album).

link

Query this table to return the links the current user has posted.

link_stat

Query this table to return detailed information from your Facebook Share implementation.

mailbox_folder

Query this table to return information about a user's Inbox folders.

message

Query this table to return information about messages in a thread.

note

Query this table to return the notes the current user has written or to return details for a
particular note.

notification

Query this table to get the notifications for the current session user, that is, any notification
that appears on http://www.facebook.com/notifications.php.

object_url

Query this table to return information about a URL in the Open Graph

Cara - Duzan - Liberal - Porolli - Zanuso 47/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
page

Query this table to return information about a Facebook Page.

page_admin

Query this table to return information about the admin of a Facebook Page.

page_fan

Query this table to return information about the fan of a Facebook Page.

permissions

Query this table to return the extended permissions the current user has granted to the
application.

permissions_info

Query this table to return more descriptive information about extended permissions.

photo

Query this table to return information about a photo.

photo_tag

Query this table to return information about a photo tag.

place

Query this table to return information about a place.

privacy

Query this table to return a user's privacy setting for a given object_id.

profile

Query this table to return certain (typically publicly) viewable information from a user's
profile or Facebook Page that is displayed in a story.

review

Cara - Duzan - Liberal - Porolli - Zanuso 48/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Query this table to obtain reviews associated with an application, a user or both.

standard_friend_info

Query this table to determine whether two users are linked together as friends.

standard_user_info

Query this table to return standard information about a user, for use when you need analytic
information only.

status

Query this table to return one or more of a user's statuses.

stream

Query this table to return posts from a user's stream or the user's profile.

stream_filter

Query this table to return a filter_key that can be used to query the stream FQL table, as
seen through any content filters the user has available on Facebook.

stream_tag

Query this table to return associations between users or Facebook Pages and the items they
tag in status posts.

thread

Query this table to return information about message threads in a user's Inbox.

translation

Query this table to return the native strings (original, untranslated text in your application
interface) and the translated strings for your application.

unified_message

This table can be used to access information about messages in the new Facebook
messaging system.

unified_thread

Cara - Duzan - Liberal - Porolli - Zanuso 49/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
This table can be used to access information about threads in the new Facebook messaging
system.

unified_thread_action

This table should be used to access information about subscribe and unsubscribe actions
performed on a thread in the new Facebook messaging system.

unified_thread_count

This table should be used to access information about the number of threads in a folder in
the new Facebook messaging system.

user

Query this table to return detailed information from a user's profile.

video

Query this table to return information about a video.

video_tag

Query this table to return information about a video tag.

Internationalization API

Facebook is currently available in over 70 languages, thanks to a framework that allows our
user community to translate the text on Facebook. By integrating with Facebook, you can
take advantage of our Translations framework immediately, so you can enjoy the benefits
that translation can bring to your Platform application or website.

Cara - Duzan - Liberal - Porolli - Zanuso 50/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Understanding Locales

The locales that Facebook supports are available in an XML file.

Facebook locales follow ISO language and country codes respectively, concatenated by an
underscore.

The basic format is ''ll_CC'', where ''ll'' is a two-letter language code, and ''CC'' is a two-
letter country code. For instance, 'en_US' represents US English.

There are two exceptions that do not follow the ISO standard: ar_AR and es_LA. We use
these to denote umbrella locales for Arabic and Spanish, despite in the latter case having a
few more specialized localizations of Spanish.

You can determine this information about a user by examining the locale field of the User
Graph API object.

Support Locales in Social Plugins and the JavaScript SDK

If you're rendering a social plugin in an IFrame, Facebook automatically translates the text
because it's based on the viewing user's locale.

If you're using XFBML, you need to load the JavaScript SDK in the appropriate locale for
your site. For example, if your site is in Spanish, reference this script:

http://connect.facebook.net/es_LA/all.js

Internationalizing your Application

The following steps assume you have created an application and have an application ID.

 Preparing your application for translation


 Registering the text you want translated
 Marking up text for translation
 Getting your application translated
 Managing the translation process
 Best practices

Preparing Your Application for Translation

In order to opt into the Facebook Translations framework, you need to set the native
language for your application, then you need to decide into which languages you want your
application translated.

Cara - Duzan - Liberal - Porolli - Zanuso 51/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Selecting Your Native Language

1. Go to the My Applications page in the Facebook Developer application, where you


initially configured your application.
2. Select the application you want translated, then click Edit Settings.
3. On the Basic tab, select the Language in which your application is currently
written, then save your selection. This selection determines the native language
from which translations will occur.

Choosing Languages for Translation

Once you configure your application's native language, you need to specify into which
languages you want your application translated.

1. Visit the Translations admin panel for your application. Select which application
you want to translate from the dropdown menu in the upper right corner.
2. Enable a language for translation. To enable translation of your application into a
particular locale, select the row for the appropriate Language, then check the On
check box for that locale. After checking it, users can see any strings that you mark
as translatable, and can provide translations for them.
Note: If this check box is NOT checked, the only people who can translate your
application into this language are the application's developers (listed in the
Facebook Developer application) and those designated as the language managers for
this language in the Language Managers column.

Once you initiate the translation process, you'll return to the Translations dashboard when
you need to do more administration. For now, these steps are the ones necessary to get
started.

Registering the Text You Want Translated

Text can come from a lot of places, and it's important that if your application is available in
a language that everything is translatable. The following is an exhaustive list of all places
that you may find content you need to prepare for the translation process.

Text that gets rendered within your application or website.

Use FBML (for FBML applications) or XFBML (for Facebook websites or IFrame
applications) markup tags for this text.

Text entered on facebook.com.

There is a list of static text about your application that you may enter on facebook.com
which you may want to have translated. Each of these fields, when submitted or updated on

Cara - Duzan - Liberal - Porolli - Zanuso 52/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Facebook, will automatically be registered on the Translations application on behalf of your
application.

 Application Name
 Application Description
 Tab Name
 Attachment Text
 Description (from the Application Profile)
 About the Developers (from the Application Profile)

Once a translation is ready for any of these fields from the Translations application, it will
automatically get used on Facebook without any further effort on the part of the developer.

Text sent through Facebook communication channels (like stream attachments).

Wrap the text using the FBML internationalization markup tags. Then, use
intl.uploadNativeStrings if you want to register the text to be translatable by users before
actually sending it.

Text contained within your databases.

You may have content that isn't rendered directly. For instance, if your application is an
online store, you might store a list of item names of your inventory. In order for this text to
be registered for translation, use intl.uploadNativeStrings to register all variations of the
text that include each item from your database.

Note: This technique should not apply to strings that change frequently, or are user-
generated. Each application has a static limit for the number of strings that may be
registered at any given time, so it's important to avoid submitting dynamic content for
translation.

Text contained within images or other non-text-based representations.

This content cannot be translated directly using Facebook Translations. If you want to serve
internationalized images, you need to generate an image for each language you wish to
support, and determine the user's locale (for example, via users.getInfo) to decide which
image to serve them.

Marking Up Text for Translation

In order for you to submit structured text for use with Facebook Translations, there are a
number of FBML and XFBML tags that have been added to accomplish this.

 fb:intl -- The principal tag for making a string of text translatable.

Cara - Duzan - Liberal - Porolli - Zanuso 53/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
 fb:intl-token -- Replaces a token contained within fb:intl with its content.
 fb:tag -- Renders an HTML tag. Only useful in conjunction with fb:tag-attribute.
 fb:tag-attribute -- Contains the value of an HTML attribute specified by fb:tag that
needs to be translatable.
 fb:tag-body -- Contains the contents of an HTML tag specified by fb:tag. Only
useful when fb:tag-attribute is needed.
 fb:date -- Renders a date, adjusting the format correctly depending on the locale
settings of the viewing user.
 fb:fbml-attribute -- Similar to fb:tag-attribute, this contains the value of an attribute
of an FBML tag, allowing the value to be translated. (FBML only)
 fb:window-title -- Including this allows the window title of the current IFrame to be
translatable. Note that this tag is only useful for Facebook Connect websites.
(XFBML only)

Example Code

Let's say you have the following FBML in your application (or XFBML on your site):

Give <fb:name uid="4800348" useyou="false" firstnameonly=true/>


a copy of "Catcher In the Rye"?

When Facebook renders the FBML, this would yield the proper English sentence 'Give
James a copy of "Catcher In the Rye"?'. However, in order to render it in a way that is
translatable, this line must be converted to the following:

<fb:intl desc="Asking whether user wants to give a book to someone">


Give <fb:name uid="4800348" useyou="false"/> a copy of "{book-title}"?
<fb:intl-token name="book-title">
Catcher In the Rye
</fb:intl-token>
</fb:intl>

Some things to note about this code:

 The variable text (the book title) is a token formatted in curly brackets, since you
don't want the actual book title to be part of the translatable text. This string,
including the token, is what translators will need to be able to translate, using only
the description as context. Wrapping the text in fb:intl-token places the variable text
into the string at render time. The name attribute must be the string in the token(s) it
is meant to replace. While these components generally can be ordered in any way,
you should do something similar to the above, for the sake of readability and to
prevent forgetting tokens.
 The translatable message still contains the fb:name tag. This tag gets displayed as a
token when the string is presented to translators, but the token is inserted by
Facebook's translation system. You do not need to put it inside curly braces

Cara - Duzan - Liberal - Porolli - Zanuso 54/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
manually. The translator will be presented with the string, "Give {name} a copy of
"{book-title}"?" in this case.

Once your FBML text uses these tags, it will be uploaded to the Translations application on
the first canvas page load containing this FBML. After that initial page load, it will be
translatable both in the Translations application as well as inline by Facebook users. Once
the text is translated in, say, Spanish, it will appear to users browsing in the Spanish locale.

Best Practices

Much of this may become clearer after reading the best practices for advice on how to best
prepare your applications. We strongly encourage you to do so.

Getting Your Application Translated

Now that you prepared your application or site for translation and registered all the text you
want translated, you can start getting the text translated. Any Facebook user can translate
your application, but it's much easier for people who have already authorized your
application.

Users can translate text in two ways:

 Inline while using your application.


 Translating in bulk from the Translations application itself, which is an easy way to
translate many strings of text at once.

Inline Translations

Users can translate strings inline if they've enabled this mode of translation. The screenshot
below shows what inline translation mode looks like to a user. Underlined strings are
available for translation (and voting) simply by right-clicking on the underlined text.

Cara - Duzan - Liberal - Porolli - Zanuso 55/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011

Users can enable inline translating by clicking the link in the Translations dialog on the
status bar.

Bulk Translation

The Translations application has a user interface that allows translators to quickly and
efficiently translate many strings. To direct a user to translate your application's strings in
bulk, link them to http://www.facebook.com/translations/index.php?translate?
app=<YOUR_APP_ID>, specifying your application ID.

Learn More

The best way to learn how your application can be translated is to actually try it out. The
Facebook Translations application has a help guide for getting started with translating. This
may help you better understand the process.

Managing the Translation Process

Use the Translations admin panel to manage the translation process for your applications.

1. Visit the Translations admin panel for your application. If the default selection is
not the application you wish to translate, select the right one from the dropdown in
the upper right corner.

Cara - Duzan - Liberal - Porolli - Zanuso 56/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011

2. Enable it for translation: To enable translation of your application into a particular


locale, select the row for the appropriate Language, then check the On check box
for that locale. After checking it, users can see any strings that you mark as
translatable, and can provide translations for them.
Note: If this check box is NOT checked, the only people who can translate your
application into this language are the application's developers (listed in the
Facebook Developer application) and those designated as the language managers for
this language (see the Language Managers column).
3. Review translated strings: Click the link for the language in the Language
column. You are taken to the Browse Phrases tab for text in this language.
4. Check the progress of the translation effort: The progress bar in the
Translation/Approval Progress column gives you a high level idea of what
percentage of your text is translated and/or been approved.
5. Specify language managers: In the Language Managers column, specify which
Facebook users can administer translations in the given language. These individuals
may view, add, and remove translations regardless whether the application is open
to all translators.
6. Publish in that language: When you decide that the existing translations are
sufficient, click the blue Publish link. It turns green and changes to ''Published'',
which indicates that all users that view your text while viewing Facebook in this
locale will see the translations. Additionally, if your application is (or becomes)
available in the Facebook Application Directory, then it will show up there in the
newly published locale.

Cara - Duzan - Liberal - Porolli - Zanuso 57/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Accessing Your Translations

Facebook Translations has multiple ways for you to view and access the text you've
registered for translation, as well as the translations provided by Facebook users. The
translation data retrieved from these methods may be used or stored however you choose.

You can always view and edit your text and translations from the Translations admin
console. However, you can't export translations from the console currently. You can get the
translations programmatically.

There are two programmatic ways for accessing translation data:

 Calling the intl.getTranslations API method. Call this method to easily query all
of your translations for a particular language.
 Querying the translation FQL table. Query this table for a very select set of
translation data.

Best Practices

We may make many assumptions when working with text in code, which may not always
hold true in other languages. To help you prepare your application for most languages and
quirks, we offer these best practices and lessons learned by the Facebook
internationalization team. Unless otherwise indicated, these examples apply to both FBML
and XFBML markup.

Be Descriptive

In general, text under 20 characters should have a description (use the desc attribute). A
word like "Poke" can vary if it is used as a noun or a verb. Facebook Translations works by
creating a hash value from the text and description of the phrase. That means that even a
slight change to the original text or description will cause your string to be counted as a
completely new one. So err on the side of starting off with a complete description you won't
have to clarify later. For example, do this:

<fb:intl desc="Label for name of photo album">Name:</fb:intl>

In some languages, the word for "name" is different depending on whether it's the name of
a person, a place, or an object. A description here allows a translator to choose the correct
word for this label.

Descriptions should usually indicate context as well as meaning. This is especially


important for things like link text that are presented as part of a larger grammatical
structure like a sentence.

Cara - Duzan - Liberal - Porolli - Zanuso 58/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
So do this:

<fb:intl desc="In, 'X's photos are ready to view.'">{name}'s


photos</fb:intl>

In languages where nouns change depending on whether they're used as the subject or
object of a sentence, this description will allow translators to use the correct form.

Don't Translate Markup

Don't include HTML markup in a translatable string; split the text into multiple translatable
strings. Otherwise, translators will be able to modify your markup. Never put tags with
behavior such as <a> inside a translatable string, since a translator would be able to make
changes to the tag's contents. This is a better way to render an anchor:

<fb:intl>Click {=here} to continue.


<fb:intl-token name="=here">
<a href="xyzzy">
<fb:intl desc="In 'Click here to continue'">here</fb:intl>
</a>
</fb:intl-token>
</fb:intl>

Use CSS instead of Markup

Use CSS rather than markup to confine text to particular parts of the page or to style your
text. For example, if you have the text "Next Page" and you want each word on a separate
line, put it in a <div> with a maximum width rather than putting a <br> tag in between the
two words. Don't split the text into separately translatable units since it will prevent
translators from changing word order if needed.

Don't do either of these:

<fb:intl>Next<br/>Page</fb:intl>

<fb:intl>Next</fb:intl><br/><fb:intl>Page</fb:intl>

If a language needs the word for "Page" to come before the word for "Next", it is
impossible to translate correctly.

Rather, do this:

<div class="limited-width-box"><fb:intl>Next Page</fb:intl></div>

With appropriate CSS, the browser will word wrap the string appropriately.

Cara - Duzan - Liberal - Porolli - Zanuso 59/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Translating Attributes of HTML Tags

There are some HTML tags that have attributes that can take on text values, like the "value"
attribute of an <input> tag or the "alt" text of an image. To make situations like these
translatable, use fb:tag-attribute. You would format markup for a form like this:

<input type="submit">
<fb:tag-attribute name="value">
<fb:intl desc="Button action: Submit a form">Click here</fb:intl>
</fb:tag-attribute>
</input>

Avoid Layouts Relying on Precise Sizing

Try not to use layouts that depend on the precise onscreen sizes of pieces of text in the
original language. For any piece of text, in some languages it is likely to be shorter and in
some it will be longer (sometimes significantly so in either direction.) If you have sized
your user interface elements such that your text just barely fits, your application will
probably not work well in a language with longer words.

Assume Word Order Will Change

Assume that a translator will have to change the word order of every sentence. In particular,
don't try to assemble sentences from smaller separately-translatable fragments, because
even if you provide excellent descriptions, it's likely you will make it impossible for a
translator to come up with a grammatically correct translation. Instead, expand all the
possible cases out into separate translatable sentences and choose a complete sentence in
your code.

Here's a simple example to avoid:

<fb:intl>You are eating</fb:intl> <fb:intl>at home.</fb:intl>


<fb:intl>You are eating</fb:intl> <fb:intl>at a restaurant.</fb:intl>

Here the code is printing the beginning of the sentence, which doesn't change in English,
then choosing one of two possible endings. This is impossible to translate correctly to
Chinese, where the phrases for "at home" and "at a restaurant" need to come before the
word for "eating".

In this case, use separate phrases:

<fb:intl>You are eating at home.</fb:intl>


<fb:intl>You are eating at a restaurant.</fb:intl>

Cara - Duzan - Liberal - Porolli - Zanuso 60/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Here the code chooses one of two complete sentences. The translator can adjust the word
order of both sentences as needed, and these can be correctly translated into every
language.

Or, say you have a phrase like "You have {number} photos." where you use the word
"photo" when the number is 1, expand this out into separate complete sentences line, "You
have one photo." and "You have {number} photos.", like this:

<fb:intl>You have one photo.</fb:intl>

<fb:intl>You have {number} photos.


<fb:intl-token name="number">5</fb:intl-token>
</fb:intl>

Don't Hardcode Punctuation

Different languages use different punctuation symbols; for example, Chinese has two
different comma characters that are used in different contexts. And Japanese uses its own
end-of-sentence character, which is not an English-style period. In general if you allow
translators to translate complete sentences (including periods and commas) this won't be as
big an issue for you. So you should include punctuation within the fb:intl tags:

<fb:intl>You have mail.</fb:intl>

<fb:intl>Favorite color:</fb:intl> &lt;input ...>

Including the colon as part of the translatable string means translators can substitute another
punctuation mark if applicable, or can insert whitespace between the text and the colon (as
is done in French, for example.)

Messing with Your <head> (XFBML Only)

Generally speaking, XFBML will work anywhere in the <body> tag of your page.
However, this doesn't account for the title of the window. You can set a window title using
the fb:window-title tag, placing it anywhere in your document where normal XFBML can
be parsed. It will take the rendered contents of the tag as your document's title. You could
now enable a translated window title with the following:

<fb:window-title>
<fb:intl desc="Title of a Web page">Welcome!</fb:intl>
</fb:window-title>

Credits API
The Facebook Credits API enables a user to use credits as a method for purchasing digital and
virtual goods within your app.

Cara - Duzan - Liberal - Porolli - Zanuso 61/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
API Overview

The Facebook Credits API enables a user to use credits as a method for purchasing digital
and virtual goods within a Facebook canvas application. Please note: the credits api is not
yet available for use by external websites but only on canvas iframe applications.

A user places an order by clicking a "Pay with Facebook" button. The order gets submitted
to Facebook through JavaScript. Based on the contents of the 'order_info' parameter passed
to Facebook (see below), Facebook gets the item details.

Facebook then displays those details to the user and waits for confirmation from the user. If
the user has sufficient credits or if the user has a stored credit card or other payment
credential on file, the order gets fulfilled in a confirmation dialog, without navigating away
from the application. When the user does not have payment credentials on file, the user
may get redirected to a new page for entering credentials or may stay within the dialog,
depending on the payment type.

When the user confirms their willingness to pay, Facebook calls the application backend to
let the application owner's system settle the order. Once the application responds, Facebook
completes the transaction appropriately and shows the result to the user. If the payment was
done in the dialog, the user can click continue to close the payment dialog and follow a
javascript instruction set by the application. If the payment was completed on the full page,
the user can click continue to go to a destination url set by the application.

The Credits API has two components: a front end credits API and a back end credits API.
The following diagram roughly illustrates a simple order fulfillment process.

Cara - Duzan - Liberal - Porolli - Zanuso 62/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011

Setting Up Your Application

To enable your application for Credits, please go to the Developer App and click "Edit
Settings" for the application you wish to enable. Then, click on "Credits" on the left-hand
rail and follow the steps provided.

Once your application has been credits-enabled, you can begin setting up your test
environment by downloading the Facebook Credits Sample application from Github. Links
and more information on our Facebook Credits branding assets can be found here.

When using the new JS SDK be sure to turn on the 'signed_request' parameter for OAuth
2.0. This can be found in the developer application under Advanced -> Migrations ->
OAuth 2.0 for Canvas (beta).

Remember to declare yourself as a test user. Orders from test users are not processed and
you will never be charged for a transaction.

Currently, only IFrame applications on Facebook can use the following Credits API
methods. Facebook Connect sites cannot use the API.

Cara - Duzan - Liberal - Porolli - Zanuso 63/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011

Best Practices Guide

To ensure your application is successful with Facebook Credits we have provided an


integration guide which will help you through the process of effectively implementing
credits in your application and clarify differences in integration types.

Creating your Callback

Every credits-enabled application has a callback URL that was defined in your application
settings. Facebook will call this page after a user has clicked on the Facebook Credits
button in your application. A significant amount of logic must be coded into your callback
to handle multiple communications between Facebook and your application.

When Facebook receives a request - such as a pay request - we will call your callback URL
and pass back the method name "payments_get_items" along with any information you
passed in the order_info field. All of the information passed between Facebook and your
callback URL will be JSON-encoded so you will have to decode before parsing.

Your callback should have a conditional that parses out to POST variable called 'method'. If
it sees "payments_get_items", it should then parse out the POST variable called 'order_info'
and get the values you passed to Facebook originally.

Do a lookup in your database for that product_id and pull the item_title, item_description,
price, product_url, and image_url to populate those respective fields.

After this is passed back, Facebook will display the dialog popup with the accompanying
item information along with a "Confirm" or "Cancel" button.

If the buyer clicks "Confirm", Facebook will call your same callback URL and return
"payments_status_update" with a status set to "placed", an order number, and the item
information.

Your callback program should once again parse out the POST variable called 'method' and
branch to logic based on the "payments_status_update" method. In your logic for this
method call, you should also parse out "status" and "order_id".

Check to make sure the "status" is "placed". If so, then set a next_state = "settled" which
you will pass back to Facebook. You MUST also passback the method name and the
order_id.

Cara - Duzan - Liberal - Porolli - Zanuso 64/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Facebook will then execute the transaction to capture any funds from the buyer to fill their
Credits balance, and then move the appropriate number of Credits from their balance to
your account.

When this has been completed, Facebook will once again callback to your callback URL
with the method "payments_status_update" and the "status" variable set to "settled". This is
when you will definitively know that the transaction was completed successfully and you
can then perform any operations to give the item to the user.

Please refer to the Application Callback section for more details.

You can also view the Credits Sample App callback.php at Github.

Payment Prompt

Using the "pay" method, you can open a modal dialog that will contain specific information
about the item. The modal dialog will contain an item's title, description, its price in
Credits, and an image of the item.

Note:You should only call "pay" using an internal key that is meaningful only to you and
points to a database record that contains item information.

Below is a code snippet that shows how to call the Facebook Credits API in JavaScript. To
test this quickly, you should use the Credits Sample App on Github.

Making call using the JS SDK:


// This example requires callback.php to be enabled and coded.

<html>
<head>
<title>My Facebook Credits Page</title>
</head>
<body>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<p> <a onclick="placeOrder(); return false;">Buy Stuff</a></p>

<script>
FB.init({appId: <your_app_id>, status: true, cookie: true});

function placeOrder() {

// Assign an internal ID that points to a database record


var order_info = 'abc123';

// calling the API ...


var obj = {

Cara - Duzan - Liberal - Porolli - Zanuso 65/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
method: 'pay',
order_info: order_info,
purchase_type: 'item'
};

FB.ui(obj, callback);
}

var callback = function(data) {


if (data['order_id']) {
return true;
} else {
//handle errors here
return false;
}
};

function writeback(str) {
document.getElementById('output').innerHTML=str;
}
</script>
</body>
</html>

Attributes:

 method - set to "pay"


 order_info - your internal key to associated product information
 purchase_type - set to "item"

If you need to open the pay dialog in a new page, please refer to the pay dialog
documentation.

Get More Credits

This feature is an API call that allows users to purchase credits without having to purchase
an item with that purchase.

Making call using the JS SDK:


<html>
<head>
<title>My Facebook Credits Page</title>
</head>
<body>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<p> <a onclick="getMore(); return false;">Get More</a></p>

<script>

Cara - Duzan - Liberal - Porolli - Zanuso 66/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
function getMore(){
// Initialization
FB.init({appId: <your_app_id>, status: true, cookie: true});

// calling the API ...


var obj = {
method: 'pay',
credits_purchase: true,
};

FB.ui(obj, callback);
}
</script>
</body>
</html>

Attributes:

 method: string - new JS SDK method to initiate credits purchase dialog


 credits_purchase - boolean

Earning Credits Using Offers

This feature allows your users to earn credits by completing advertiser offers. Download
TrialPay's Direct Access to Offers integration guide to learn more.

Making call using the JS SDK:


<html>
<head>
<title>My Facebook Credits Page</title>
</head>
<body>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<p> <a onclick="earnCredits(); return false;">Earn Credits</a></p>

<script>
function earnCredits(){
// Initialization
FB.init({appId: <your_app_id>, status: true, cookie: true});

// calling the API ...


var obj = {
method: 'pay',
credits_purchase: true,
dev_purchase_params: {"shortcut":"offer"}
};

FB.ui(obj, callback);
}

Cara - Duzan - Liberal - Porolli - Zanuso 67/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
</script>
</body>
</html>

Note: If you have not yet transitioned to the new JS SDK, please refer to the Direct Access
to Offers guide for alternate integration instructions.

Attributes:

 method: string - new JS SDK method to initiate credits purchase dialog


 credits_purchase - boolean
 dev_purchase_params - JSON object

Earning Credits Using DealSpot

This feature allows your users to earn credits by completing an exclusive daily offer.
Download TrialPay's DealSpot integration guide to learn more.

Making front end call:


http://assets.tp-cdn.com/static3/swf/dealspot.swf?
app_id=&mode=fbpayments&sid=

Parameters:

 app_id: Your Facebook application ID number


 sid: The user's unique third-party identifier

Please Note:

 DealSpot will automatically rotate (and hide when appropriate) deal icons based on
promotion availability
 You must allow the DealSpot SWF to communicate with its host page (eg set
trustContent flag to true) . Please refer to the DealSpot integration guide to learn
more.

Get Balance

This whitelisted feature is an API call that allows an application to determine a user's
balance. It is only available to developers who have designated Credits as their in-game
currency. You can apply here.

Cara - Duzan - Liberal - Porolli - Zanuso 68/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Please Note: This feature is currently only available through the old PHP SDK. You also
must re-authenticate the user after whitelisting, before making the function call.

Making backend call:


$obj = json_decode(

file_get_contents('https://api.facebook.com/method/users.getStandardinfo'
.
'?
uids=<UID>&fields=credit_balance&access_token='.
'<ACCESS_TOKEN>&format=json'));

returns Array ( [0] => stdClass Object ( [uid] => [credit_balance] => 48
) )

Attributes:

 $user_id: user id - must already have added the application


 $access_token: access_token - your application's access_token

Gamer Status

This whitelisted feature is an API call which will help developers understand and scope
their game economies. It is only available to developers who have designated Credits as
their in-game currency. You can apply here.

Each user is tagged with a gamer_status. The set of users tagged with gamer_status > 0 will
monetize at a much higher rate than the general population and are eligible for up to 20%
discounts on Credits packages and so may affect the economy of your game. The
gamer_status tag does not tell you anything specific about this particular user, except that
they are in a pool of users that monetize at a much higher rate than the general population,
and that are likely, but not certainly, eligible for significant discounts on facebook credits.

You may not use gamer_status for any purpose other than internal and administrative
purposes related to the operation of your game. For example, you may not use this
information for marketing purposes. You may offer special discounts to these users, but
you may not increase prices for these users.

$ret = $facebook->api_client->users_getStandardInfo($user_id,
array('gamer_status'));

Cara - Duzan - Liberal - Porolli - Zanuso 69/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Buy with Friends

This feature allows developers to make their promotions or deals more effective, let users
easily share these with their friends, and let these friends buy promoted items directly from
their news feed without having to visit the game. It is only available to developers who
have designated Credits as their in-game currency. You can apply here.

To use Buy With Friends, you need to first create a deal with certain parameters (duration,
% discount, etc.) and then assign one or more items to that deal. You must use the Deal
Graph API to determine if a deal is available to a user or not.

Making call using the JS SDK:


<script>

// Initiate JS FB object
FB.init({appId: [app id], status: true, cookie: true});

var order_info = [order information];

// Purchase parameters
// Assumes you’ve already created a deal
var dev_purchase_params = {
deal_id: [deal id]
};

// Populate request object


var obj = {
method: "pay",
order_info: order_info,
// A purchase for credits so set to true
credits_purchase: true,
dev_purchase_params: dev_purchase_params
};

// Submit order to Facebook


FB.ui(obj, callback);

</script>

Facebook will load the Buy with Friends purchase dialog. Please note that Facebook will
not issue a request to your payments_get_items callback which differs from a normal
purchase flow. Facebook will use the information provided in your Graph API product and
deal objects to construct the BWF purchase dialog.

You can apply for in-game incentives here.

Cara - Duzan - Liberal - Porolli - Zanuso 70/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Frictionless Payments

On Monday, May 2, 2011, we plan to launch and rollout Auto-Frictionless Payments for
items under 100 Facebook Credits, over a period of approximately one week. After a user
purchases an item, Facebook will automatically display a success dialog to the user. As a
result, you will no longer need to call the Frictionless Payments API documented below. As
a best practice, please check that items under 100 Facebook Credits are clearly labeled with
price and nearby buy button to maintain the user experience. Note: that if you’ve already
implemented the frictionless API on your games' items, these items should not be affected;
however, once Auto-Frictionless Payments is ramped to 100 percent of users, we
encourage you to deprecate your use of this API, and just use our standard payment flow
which will automatically default to a frictionless payment for items under 100 credits.

This feature allows developers to debit a player's balance without initiating the Facebook
Credits Payment Dialog. This feature is not a replacement for the pay dialog, and will only
work for users who have a balance greater than or equal to the amount being requested. In
addition, your application is required to display the user's Credits balance. It is only
available to developers who have designated Credits as their in-game currency. You can
apply here.

You must explicitly handle the event in which a user has insufficient credits by popping the
pay dialog to purchase additional credits. Once this has been processed, the call can be
reissued.

Since you are passing an internal key to Facebook, Facebook will ask your application to
return the product price using "payments_get_items". Facebook will automatically return
"payments_status_update" to "settled" rather than "placed" since there is no confirmation
required from the user.

Note: In order to execute this API call, the user must have interacted with your application
in the last 30 minutes. This timeframe is required to tightly couple an item purchase and its
associated debit from the user's remaining balance.

Calling frictionless using the Graph API


$app_id = APPLICATION_ID;
$app_secret = APPLICATION_SECRET;
$to_id = USER_ID_TRANSFERRING_FUNDS;

$app_token_url = "https://graph.facebook.com/oauth/access_token?
client_id=".
$app_id."&client_secret=".
$app_secret."&grant_type=client_credentials";

$app_access_token = file_get_contents($app_token_url);

$url = "https://graph.facebook.com/".$app_id."/payments?to=".
$app_id."&from=".

Cara - Duzan - Liberal - Porolli - Zanuso 71/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
$to_id."&"."order_details=abc123&method=post&".$app_access_token;

$ret = file_get_contents($url);

echo "Order ID: ".$ret;

Parameters:

 [app id] - Your App ID.


 access_token - your application access token.
 from - User ID
 to - Your App ID
 order_details - an internal key that points to a product record in your database.

Error Codes:

Error Code Suggested Action


API_EC_INSUFFICIENT_BALANCE Invoke Credits flow via JS
API_EC_PAYMENTS_UNKNOWN Indicate failure to user
API_EC_PAYMENTS_APP_INVALID Your application is not provisioned.
A database error occurred. Please try
API_EC_PAYMENTS_DATABASE
again.
API_EC_PAYMENTS_PERMISSION_DENIED Invoke Credits flow via JS
Payments callback to the application
API_EC_PAYMENTS_APP_NO_RESPONSE
failed.
Payments callback to the application
API_EC_PAYMENTS_APP_ERROR_RESPONSE
received error response.
API_EC_PAYMENTS_INVALID_ORDER The supplied order-id is invalid.
One of the Payments parameters is
API_EC_PAYMENTS_INVALID_PARAM
invalid.
API_EC_PAYMENTS_INVALID_OPERATION Invalid operation.
API_EC_PAYMENTS_DISABLED Facebook Credits is disabled.

Credits Graph API

You can interact with orders created by the application using the Facebook Credits Graph
API to view and update orders as needed. An Order ID is an object within the Graph API.

Note: You must use actual orders when calling the Graph API. Orders from test users will
not be processed.

Cara - Duzan - Liberal - Porolli - Zanuso 72/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Get Order

Gets order details for the specified order_id

API

GET https://graph.facebook.com/[order id]?access_token=ACCESS_TOKEN

Parameters:

 [order id] - The 64-bit ID of the order.


 access_token - your application access token.

Returns:

 a JSON object:
 {
 "id": "",
 "from": {
 "name": "",
 "id": ""
 },
 "to": {
 "name": "",
 "id": ""
 },
 "amount": ,
 "status": "",
 "application": {
 "name": "",
 "id": ""
 },
 "country": "",
 "created_time": "",
 "updated_time": ""
 }

 refund_code: Only returned if the order was refunded by Facebook. See Refund
Reason Codes below.

Cara - Duzan - Liberal - Porolli - Zanuso 73/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Update Order

Updates the status of an existing order

API

POST https://graph.facebook.com/[order id]?


access_token=ACCESS_TOKEN&status=STATUS&message=MESSAGE&refund_funding_so
urce=SOURCE

Parameters:

 [order id] - The 64-bit ID of the order.


 access_token - your application access token.
 status - A string representing the status we want the order to move to. Specify one
of "settled", "refunded" or "canceled".
 message - a message to associate with the update of the order
 refund_funding_source - Boolean - true if refunding the source of payment (credit
card, paypal, etc.) or false otherwise (refund credits)
 refund_reason - reason for refund
 params - optional JSON-encoded dictionary {'comment' => }

Returns:

 success or failure as boolean

Get Orders

Returns all orders for the given application. Note: currently we will only return 100,000
orders for a single date/time range. If you need to pull more than 100,000 orders for a
single 24 hour period, then please split the day into multiple dayparts and make multiple
queries.

API

GET https://graph.facebook.com/[app id]/payments?


status=STATUS&since=SINCE&until=UNTIL&access_token=ACCESS_TOKEN
GET https://graph.facebook.com/[user id]/payments?
status=STATUS&since=SINCE&until=UNTIL&access_token=ACCESS_TOKEN

Parameters

Cara - Duzan - Liberal - Porolli - Zanuso 74/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
 [app id] - Your application ID.
 [user id] - The user must have added the application.
 status - Return orders with the specified status. Specify one of "reserved", "settled",
or "refunded".
 since - Unix time
 until - Unix time. You cannot exceed 24 hours between your start and end times. If
you need to pull a full week, simply call your getOrders 7 times, each time for a full
24 hour day
 access_token - your application access token.

Returns:

 A JSON object:
 {
 "data": [
 {
 "id": "",
 "from": {
 "name": "",
 "id": ""
 },
 "to": {
 "name": "",
 "id": ""
 },
 "amount": ,
 "status": "",
 "application": {
 "name": "",
 "id": ""
 },
 "created_time": "",
 "updated_time": ""
 },
 ...
 ],
 "paging": {
 "previous": "",
 "next": ""
 }
 }

Cara - Duzan - Liberal - Porolli - Zanuso 75/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Application Callbacks

There are two callbacks Facebook makes on the application back end. The application
needs to verify the fb_sig parameter to make sure that the request is coming from facebook.

payments_get_items: Along with the call, Facebook provides the order_id and order_info,
and expects to get a JSON-encoded array of items associated with the order.
Parameters:

1. order_id - The 64-bit ID of the order.


2. order_info - This is the order_info provided to Facebook by the application from the
front end.

Return value: A JSON-encoded array of {items}. Note: Currently, only one item is
allowed, but it still gets returned as an array. An item has the following fields:

1. item_id - Your specific identifier, not used by Facebook


2. title - The name of the product. <= 50 characters.
3. description - A description of the product. <= 175 characters.
4. image_url - The URL for the image to display to the user.
5. product_url - A permalink to the URL where you display the product to the user.
6. price - The price must be greater than 0 credits.
7. data - Optional, not used by Facebook, but stored and sent to application with
order_details.

Example callback response from developer:

{"content":[{"title":"[Test Mode] Unicorn","description":"[Test Mode] Own


your own mythical
beast!","price":2,"image_url":"http:\/\/www.facebook.com\/images\/gifts\/
21.png","product_url":"http:\/\/www.facebook.com\/images\/gifts\/21.png"}
],"method":"payments_get_items"}

payments_status_update: Facebook calls the application with the order_details and status
of the order. The application responds with the status it wants to move the order to.
Parameters:

1. order_id - The 64-bit ID of the order.


2. status - Specify one of placed, reserved, settled, or canceled.
3. order_details - All of the information that was originally passed with
payments_get_items

Returns:

1. status - The value of status depends upon the order's status before the update.

Cara - Duzan - Liberal - Porolli - Zanuso 76/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
How to Respond: When the status is placed, the application can respond with canceled or
settled. (Note that the application needs to verify the fb_sig parameter to make sure that the
request is coming from facebook)

Order Statuses You can respond with one of three statuses: settled, canceled, or refunded.

Status Notes
This status occurs when the transaction has been "captured" - so moved from
settled
"authorized". The funds will be taken from the buyer's account at this time
This status can only be reached from the placed status. If this status is used, then,
if the user did not have enough credits to complete the purchase in the first place,
the user's balance will be incremented by the item_price amount specified for the
canceled
purchase by initiating a purchase of credits from that user's chosen billing
instrument. However, those credits will NOT be spent in the game -- they will just
remain in the user's balance
This status can be initiated by the you (the developer) or by Facebook. The entire
refunded amount is refunded to the buyer, and there is NO CHARGE/FEE to the developer
for the authorization

Reporting

Daily digest and detailed reports as well as bi-monthly payout reports will be sent to each
company at the email provided during signup from the address Facebook Credits
<noreply@fb.com>. Be sure this email is whitelisted from any spam filters to avoid not
receiving your reports. Each file contains no more than 100,000 lines. In case more than
100,000 lines of activities are transacted, multiple files will be provided.

Digest Report

The digest report contains a summary of each type of transaction which occurred in the live
applications associated with the parent company.

The subject of the email is in the following format with capitalized variables being unique:

COMPANY_NAME: Facebook Credits Daily Digest Report for DATE

Example:
My Sweet Company: Facebook Credits Daily Digest Report for 2011-03-02

The report is a tab separated values text file (.tsv) contained in an attachment. The name of
the attachment is in the following format with capitalized variables being unique:

Digest_FBFINANCIALID_DATEOFREPORT.tsv

Example:

Cara - Duzan - Liberal - Porolli - Zanuso 77/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Digest_12345678910_2011-03-02.tsv

The .tsv attachment is delimited tab by '\t' and newline delimited by '\n'. The first line of the
report contains the fields for which each value in a line of the report represent. The field
titles and an example row are included below.

app_id app_name txn_type txn_date settle_date value credits


12345678 CreditsApp S 2011-03-02 2011-03-02 0.0 20.0
12345678 CreditsApp S 2011-03-02 2011-03-02 0.1 139.0
12345678 CreditsApp R 2011-03-02 2011-03-02 0.1 10.0
12345678 CreditsApp D 2011-03-02 2011-03-02 0.1 5.0
123456789 CreditsAppTwo S 2011-03-02 2011-03-02 0.0 10.0
123456789 CreditsAppTwo S 2011-03-02 2011-03-02 0.1 269.0
123456789 CreditsAppTwo R 2011-03-02 2011-03-02 0.1 4.0

Detail Report

The detail report contains all transactions which occurred in the live applications associated
with the parent company.

The subject of the email is in the following format with capitalized variables being unique:

COMPANY_NAME: Facebook Credits Daily Detail Report for DATE

Example:
My Sweet Company: Facebook Credits Daily Detail Report for 2011-03-02

The report is a tab separated values text file (.tsv) contained in a zipped attachment (.zip).
The name of the attachment is in the following format with capitalized variables being
unique:

Detail_FBFINANCIALID_DATEOFREPORT_CURRENTNUMEMAILOFTOTAL_TOTALNUMEMAILS.t
sv.zip

Example:
Detail_12345678910_2011-03-02_001_001.tsv.zip

After the attachment is unzipped, the .tsv file is delimited tab by '\t' and newline delimited
by '\n'. The first line of the report contains the fields for which each value in a line of the
report represent. The field titles and an example row are included below.

app_id txn_type txn_id order_id txn_time settle_date value


credits
123456789 S 517433941473201975 9307560877689 2011-03-02 12:06:07
PST 2011-03-02 0.1 1.0

Please note: It is possible to have multiple lines in your report for an order with the same
transaction ID and/or order ID. This is due to several possible reasons.

Cara - Duzan - Liberal - Porolli - Zanuso 78/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
One possibility is when a user has zero-value credits remaining in their wallet, but not
enough to purchase an item. In this case, both zero-value and full-value credits must be
used and the transaction could look as follows.

app_id txn_type txn_id order_id txn_time settle_date value


credits
123456789 S 517433941473201975 9307560877689 2011-03-02 12:06:07
PST 2011-03-02 0.1 1.0
123456789 S 517433941473201975 9307560877689 2011-03-02 12:06:07
PST 2011-03-02 0.0 9.0

Another possible explanation for having multiple lines for an order is when the order is
refunded. The following example shows what an order that was refunded one minute after
the initial transaction should look like.

app_id txn_type txn_id order_id txn_time settle_date value


credits
123456789 S 517433941473201975 9307560877689 2011-03-02 12:06:07
PST 2011-03-02 0.1 1.0
123456789 R 517433941473201988 9307560877689 2011-03-02 12:07:07
PST 2011-03-02 0.1 1.0

Payout Summary

The payout summary will be sent on the 5th and 20th of every month. It will contain a
zipped attachment will all order details during that payout period in the same format as the
daily report. In addition to the detailed report you will also receive a summary of the
transactions for each of your apps during that payout period.

The summary email for that given payout period is formatted as follows:

app_id app_name txn_type value credits


13020537 MyTestApp S 0.0 156.0
13020537 MyTestApp S 0.1 729.0

Possible transaction types:


txn_type Type of Transaction
S (Spend) Credits spent within application
Credits refunded to user by FB or developers, netted from
R (Refund)
developer payout
Credits refunded to user by FB or developers, netted from
C (Chargeback)
developer payout
D (Chargeback) Chargeback after 90 days, not counted against net payout
L (Deferred payment
Item purchased, user defers payment until later date
initiated)
P (Deferred payment
Repayment completed, FB transfers credits to developer
repayment)

Cara - Duzan - Liberal - Porolli - Zanuso 79/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
F (Deferred payment refund) Deferred payment refunded, user does not receive Credits
Repayment refunded by FB or developer, netted from
Q (Repayment refund)
developer payout

Dispute Resolution

The dispute resolution system gives the user and the developer an easy way to interact
regarding a previous payment made using Facebook Credits, and resolve disputes among
themselves. We trust the application to resolve disputes appropriately by either refunding
the user's payment amount or by making sure that the user is satisfied, and then resolving
the dispute with appropriate explanation.

User Interaction

There is a link at the bottom of the application canvas page for apps that are using our
payments: "Report". When the user clicks the link they are prompted with choices, one of
which is "Dispute ..." which does the following:

1. Brings up order-selection dialog (shows purchases made in that app in the last 30
days) where the user chooses the order they want to dispute. This brings up a form
to input a reason (required).
2. On completion, sends a mail to the developer, Facebook, and the user setting
expectation around the dispute being between user and application.

When the user disputes an order, a 'payments_status_update' notification with 'disputed'


status is sent to the application's payments_callback_url. This is consistent with other
status-update notifications sent to the application on order-state transitions. Application can
also query the disputed orders using the /payments API.

Note: While resolving a dispute with a user, an email is sent to the developer and the user
is CCed on that email. The developer can then interact with the user through this channel to
make sure they are satisfied.

Resolve a Dispute
The developer can interact with the user and resolve the dispute in two ways:

1. By calling the /[order id] API to refund the order, you must provide the appropriate
order_id, status=refunded, in addition to specifying the reason for your refund in the
'comment' param.
2. If the developer is satisfied that the user understands the charge after the interaction
with the user, they can resolve the dispute by calling the /[order id] API with the
order-id, status=settled, and specify the reason as the comment in the params.

Cara - Duzan - Liberal - Porolli - Zanuso 80/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Note: specifying the reason is required in this case to make sure there is record for why
resolving the dispute without refunding is okay to do.

Chargebacks

An application is liable for chargebacks that occur within 90 days of the credits spent on the
application. In the event of a chargeback, all monies are refunded including processing fee.

Refund Reason Codes (GET to /[order id] API)

If you make a GET request to the /[order id] API and if the order in question has been
refunded by Facebook, then there will be an additional field returned called "refund_code"
with one of the following values:

Compromised Account
Stolen Financial Instrument
Not Fraud
User Confusion
Dev System Issue
FB System Issue

Call getOrder via graph API:

https://graph.facebook.com/ORDER_ID?access_token=ACCESS_TOKEN

Example Output:

{
"id": "9003976483685",
"from": {
"name": "Daniel Schultz",
"id": "221159"
},
"to": {
"name": "Daniel Schultz",
"id": "221159"
},
"amount": 1,
"status": "refunded",
"refund_reason_code": "FB System Issue",
"application": {
"name": "credits_new_reg",
"id": "128163550571392"
},

Cara - Duzan - Liberal - Porolli - Zanuso 81/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
"country": "US",
"created_time": "2011-02-04T20:23:17+0000",
"updated_time": "2011-02-08T19:12:03+0000"
}

Error Codes

The following section covers the respective errors with the Frontend API and Backend API.

Front End Error Codes


Error_code Error_message Note
1383001 Unknown Facebook system issue.
Developer called with the incorrect
1383002 InvalidParameters
parameters.
1383003 PaymentFailure Processor decline.
Developer attempted an operation
1383004 InvalidOperation
Facebook does not allow.
1383005 PermissionDenied Facebook system issue.
1383006 DatabaseError Facebook system issue.
App is not whitelisted. Or while in test
1383007 InvalidApp mode, Developer attempted to debit a user
that was not whitelisted.
App is not responding; perhaps a server
1383008 AppNoResponse
timeout issue.
App responded to Facebook with an error
1383009 AppErrorResponse
code.
1383010 UserCanceled User explicitly cancelled out of flow.
1383011 Disabled Facebook system issue.
1383013 OrderFailureAfterPurchaseCredit Facebook system issue.
1383014 DisputeFlow Facebook system issue.
1383015 AccountNotCharged Your application cancelled the order.
Reached maximum number of credits in
1383017 ExceedCreditBalanceLimit
your balance.
Occurs when a user has reached a
1383018 ExceedCreditDailyPurchaseLimit
predefined daily maximum
Occurs when the credit amount user spends
1383019 ExceedCreditDailySpendLimit in a single day exceeds a pre-defined
threshold.
1383040 UserThrottled Application Temporarily Unavailable
User's financial instrument could not be
1383041 BuyerPaymentFailure
charged.
1383042 LoggedOutUser Login Required

Cara - Duzan - Liberal - Porolli - Zanuso 82/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
1383043 AppInfoFetchFailure Facebook system error.
Application needs to have a valid callback
1383044 InvalidAppInfo
url.
The application didn't return a valid json
1383045 AppInvalidEncodedResponse
encoded response..
The application return value was invalid
1383046 AppInvalidDecodedResponse
after json_decoding the return value.
The application response contains a
1383047 AppInvalidMethodResponse 'method' parameter that didn't match the
request.
The application response didn't contain the
1383048 AppMissingContentResponse
'content' field.
The application returned an unknown
1383049 AppUnknownResponseError
response.
Failure to verify the user when sending
1383050 AppUserValidationFailedResponse
application callback.
The application is sending invalid item
1383051 AppInvalidItemParam parameters (For example, price or quantity
of the items is invalid).
1383052 EmptyAppId Empty App ID.
Back End Error Codes

The following errors can be returned in addition to the regular API exceptions:

Error
Error Name Note
Code
Unknown
1150 API_EC_PAYMENTS_UNKNOWN
error
Application
is not
enabled for
1151 API_EC_PAYMENTS_APP_INVALID
using
Facebook
Credits.
A database
1152 API_EC_PAYMENTS_DATABASE error
occurred.
Permission
denied to
1153 API_EC_PAYMENTS_PERMISSION_DENIED
check order
details.
1154 API_EC_PAYMENTS_APP_NO_RESPONSE Payments

Cara - Duzan - Liberal - Porolli - Zanuso 83/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
callback to
the
application
failed.
Payments
callback to
the
1155 API_EC_PAYMENTS_APP_ERROR_RESPONSE application
received
error
response.
The
supplied
1156 API_EC_PAYMENTS_INVALID_ORDER
order ID is
invalid.
One of the
Payments
1157 API_EC_PAYMENTS_INVALID_PARAM
parameters
is invalid.
The
1158 API_EC_PAYMENTS_INVALID_OPERATION operation is
invalid.
Failed in
processing
1159 API_EC_PAYMENTS_PAYMENT_FAILED
the
payment.
Facebook
Credits
1160 API_EC_PAYMENTS_DISABLED
system is
disabled.
Insufficient
1161 API_EC_PAYMENTS_INSUFFICIENT_BALANCE
balance.
Exceed
credit
1162 API_EC_PAYMENTS_EXCEED_CREDIT_BALANCE_LIMIT
balance
limit.
Exceed
API_EC_PAYMENTS_EXCEED_CREDIT_DAILY_PURCHASE_LI daily credit
1163
MIT purchase
limit.
Exceed
1164 API_EC_PAYMENTS_EXCEED_CREDIT_DAILY_SPEND_LIMIT daily credit
spend limit.
1166 API_EC_PAYMENTS_INVALID_FUNDING_AMOUNT Credits

Cara - Duzan - Liberal - Porolli - Zanuso 84/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
purchased
from
funding
source do
not match
the spend
order
amount.
The funding
source is a
non-
1167 API_EC_PAYMENTS_NON_REFUNDABLE_PAYMENT_METHOD
refundable
payment
method.
Application
is
1168 API_EC_PAYMENTS_USER_THROTTLED configured
to throttle
some users.
User is not
1169 API_EC_PAYMENTS_LOGIN_REQUIRED
logged in.
Error
retrieving
1170 API_EC_APP_INFO_FETCH_FAILURE application
information
.
Invalid
application
1171 API_EC_INVALID_APP_INFO
information
returned.
Application
has
1172 API_EC_PAYMENTS_APP_INSUFFICIENT_BALANCE insufficient
balance
(app2user).

Ads API
The Facebook Ads API lets you create and manage your own ads on Facebook programmatically,
without using the Facebook Advertising Manager tool.

You can use the Ads API if you match one of these profiles:

Cara - Duzan - Liberal - Porolli - Zanuso 85/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
 You manage your own ad spend, and have many accounts and/or many ads. You
can use the Ads API as a scalable alternative to the Facebook Advertising Manager
tool.
 You are an advertising tool vendor who sells advertising management solutions to
small- and medium-sized businesses, and you manage ads from multiple sources
(like Facebook and other online advertisers).
 You are an ad agency managing budgets and campaigns for multiple clients.

If you don't want to build your own ads management tool, you can work with a vendor who
has.

Getting Started

To get started with the Ads API, complete the following steps.

Configure your Facebook Application

To get started, you need to configure some basic settings of a Facebook application.

1. Log in to Facebook using the account you'll use to create the application. This must
be a real Facebook account, not an advertising-only "gray account."
2. Go to the Facebook Developer application and create a new application.
3. Note the Application ID Facebook provides; you will need it to agree to the Ads
API terms. You'll use the API Key to call the Ads API and to grant the application
permission for your user account (see below).

Agree to the Ads API Terms

Before you can start using the Ads API, you need to get on the Ads API whitelist. You
have to apply for the whitelist only once per application. After you have been accepted in
the Ads API Beta program and your application is whitelisted please do the following:

1. Log in to Facebook with the same account that you used to create the application
above.
2. Go to this URL: http://www.facebook.com/ads/manage/api_terms.php?
app_id=YOUR_APPLICATION_ID, replacing "YOUR_APPLICATION_ID" with
the application ID you received when you configured your application (see above).
3. Select the check box to agree to the terms provided.

Provide authentication

For an app to do ad management, a user (including an app developer) must give the app
permission. This permission is called the ads_management extended permission.

Cara - Duzan - Liberal - Porolli - Zanuso 86/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
An Ads API app is like other Facebook apps, although the Ads API is built on the REST
API. Therefore, please review Facebook for websites and the entire authentication guide to
become familiar with the Facebook platform. Please also note the following values from
your app summary, which are referred to in the examples below:

 App ID: referred to below as YOUR_APP_ID


 App secret (keep this value secret): referred to below as YOUR_APP_SECRET
 Site URL (a redirect URL): referred to below as YOUR_URL

Prompt the user for extended permission

To enable your app to manage ads for a user, you use the scope parameter to prompt the
user for the extended permission of ads_management. Also prompt the user for the
extended permission of offline_access if your app makes API calls while the user isn’t
logged into your app. For information about token expiration, see the authentication guide.

The following example uses the scope parameter to prompt the user for ads_management
and offline_access. Access is granted when the user clicks the Allow button:

https://www.facebook.com/dialog/oauth?
client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&scope=ads_management,offline_
access

Obtain the access token

If the user clicks the Allow button when you prompt for the extended permissions, the user
is redirected to a URL that contains the value of the redirect_uri parameter and an
authorization code:

http://YOUR_URL?code=AUTHORIZATION_CODE

Build a URL that includes the endpoint for getting a token, your app ID, your site URL,
your app secret, and the authorization code you just received. The URL will be similar to
the following:

https://graph.facebook.com/oauth/access_token?
client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&client_secret=YOUR_APP_SECRET
&code=AUTHORIZATION_CODE

The response should contain the access token for the user. For additional information, see
the authentication guide.

Store the access token

The token should be stored in your database for subsequent API calls.

Cara - Duzan - Liberal - Porolli - Zanuso 87/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
You should regularly check for validity of the token, and if necessary prompt the user for
permission. Even a token that works for offline access can become invalid in the following
cases:

 The user’s password changes


 The user revokes permissions

When a user starts your web application, check for the validity of the token. If necessary,
prompt the user for permissions. If this is not possible for your application (e.g., API calls
are not based on a user-interface flow, or there’s as script failure), a different way to prompt
the user may be necessary. For example, your app could email instructions to the user.

Sample code

The Ads API sample code is built on top of Facebook's PHP-SDK. The code is available
here. You can view the running sample here.

Signing Your Calls

You must sign every call you make to the Ads API.

Testing the Ads API

Once Facebook has whitelisted your application, you can test the API calls using the API
test console for each method. Be sure to select the correct application from the drop down.

The API is live, so Facebook doesn't provide a sandbox where you can test your code.

Ads API Best Practices

Keep these best practices in mind as you work with the Ads API.

Create New Ads, Don't Edit Existing Ones

You shouldn't change the targeting, title, or body for an ad for purposes of using the ad in
slightly modified form elsewhere; you should create a new ad.

Storing User Information

Facebook recommends storing user IDs, session keys, and the Ads Account ID in a manner
that makes it easy to programmatically access them and keep them together. This is
important because any calls made with an account ID belonging to one user and the session
key for another user will fail with a permissions error.

Cara - Duzan - Liberal - Porolli - Zanuso 88/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Watch for Changes in Suggested Bids

It's a good idea to run frequent reports on your campaigns, as suggested bids change
dynamically in response to bidding by competitors using similar targeting. Bid suggestions
get updated within a few hours, depending upon the bidding of competitors.

Ads API Methods and Structures

The Ads API contains methods and structures that enable you to create and manage ad
campaigns.

Account Methods

 ads.getAccounts
 ads.addAccountUsers
 ads.removeAccountUsers

Campaign Methods

 ads.createCampaigns
 ads.getCampaigns
 ads.getCampaignStats
 ads.updateCampaigns

Ad Group Methods

 ads.createCreatives
 ads.createAdGroups
 ads.estimateTargetingStats
 ads.getAdGroupCreatives
 ads.getAdGroupStats
 ads.getAdGroups
 ads.getAdGroupTargeting
 ads.getConnectionObjectIds
 ads.updateAdGroups

Keyword Methods

 ads.getAutoCompleteData
 ads.getKeywordAutocomplete
 ads.getKeywordSuggestions
 ads.getValidKeywords

Cara - Duzan - Liberal - Porolli - Zanuso 89/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Reporting Methods

 ads.getAdreportSchedules
 ads.createAdreportSchedules
 ads.updateAdreportSchedules
 ads.getAdreportJobs

Structures

 ads.adgroup specs
 ads.campaign specs
 ads.creative specs
 ads.targeting specs
 ads.report specs
 ads.schedule specs

Chat API

You can integrate Facebook Chat into your Web-based, desktop, or mobile instant
messaging products. Your instant messaging client connects to Facebook Chat via the
Jabber/XMPP service. This document describes the features and limitations of Facebook
Chat's XMPP protocol for the developer who intends to implement a Facebook Chat client.

Before reading this document, you should be familiar with the terms and concepts involved
in XMPP chat clients and servers. If you anticipate that your Jabber client will host as many
as 100,000 sessions, go to the Developer Help Contact Form and select Jabber to let us
know.

Cara - Duzan - Liberal - Porolli - Zanuso 90/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Features and Limitations

Facebook Chat currently supports the following features:

 Facebook Platform authentication using the X-FACEBOOK-PLATFORM SASL


authentication mechanism
 Username/password authentication using the DIGEST-MD5 authentication
mechanism
 Sending and receiving plain-text messages (not HTML messages)
 Sending and receiving typing notifications using the XEP-0085 protocol extension
(not the XEP-0022 extension)
 Setting the user idle using a show element in presence stanzas (there will be a delay
before the user appears idle)
 Receiving vCards using the XEP-0054 extension
 Retrieving friends' photos (either with vCard or XMPP presence)

Limitations

Facebook Chat should be compatible with every XMPP client, but is not a full XMPP
server. It should be thought of as a proxy into the world of Facebook Chat on
www.facebook.com. As a result, it has several behaviors that differ slightly from what you
would expect from a traditional XMPP service:

 Your client cannot send or receive HTML messages


 Because roster items and presence subscriptions are based on the user's Facebook
friends, they cannot be created or deleted using the standard XMPP mechanisms.
 Facebook Chat is terse when sending updates for new friends, because the
negotiation happens outside of XMPP. Future versions of Facebook Chat may be
more conformant.
 The user's own Jabber ID (JID) is different from the Jabber ID that their contacts
will see because the translation is done internally.
 Arbitrary IQ stanzas cannot be passed between clients.
 Presence probes do not currently work.
 Non-SASL authentication with the jabber:iq:auth namespace as described in
XEP-0078 is not currently supported.
 The XML parser does not yet fully handle XML namespaces. Please stick to the
same style as the examples in XMPP RFCs 3920 and 3921 when using XML
namespaces.

Configuring Chat Authentication

You can authenticate your chat client users with one of two authentication mechanisms: X-
FACEBOOK-PLATFORM (Facebook Platform) and DIGEST-MD5 (username/password).
Facebook recommends you use the X-FACEBOOK-PLATFORM mechanism to connect to

Cara - Duzan - Liberal - Porolli - Zanuso 91/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Facebook Chat whenever possible, because it provides a better user experience using
simple Facebook Platform authentication. Use the sample Python script below to get started
with X-FACEBOOK-PLATFORM.

Authenticating with Facebook Platform

We support a custom SASL mechanism called X-FACEBOOK-PLATFORM that allows


clients to connect to chat using Facebook authentication. This mechanism is preferred for
any application that is oriented toward social media in general or Facebook in particular,
especially applications that are already integrated with Facebook Platform.

In order to connect using this mechanism, the user must first log in to your application and
grant the xmpp_login extended permission.

Your application may now log in to Facebook Chat via Jabber using the X-FACEBOOK-
PLATFORM mechanism. The user's Jabber ID will be assigned during the resource binding
step of XMPP. Please keep in mind that while all of the messages defined by the X-
FACEBOOK-PLATFORM mechanism are UTF-8 strings, XMPP specifies that they
should be Base64-encoded before being sent over the wire.

The mechanism starts with a server challenge, in the form of a common HTTP query string:
an ampersand-separated sequence of equals-sign-delimited key/value pairs. The keys and
values are UTF-8-encoded and URL-encoded. The query string contains two items: method
and nonce.

The client's reply should be a similarly-encoded query string prepared as if it were going to
call a method against the Facebook API. The call should contain the following parameters:

 string method: Should be the same as the method specified by the server.
 string api_key: The application key associated with the calling application.
 string session_key: The session key of the logged in user.
 float call_id: The request's sequence number.
 string sig: An MD5 hash of the current request and your secret key.
 string v: This must be set to 1.0 to use this version of the API.
 string format: Optional - Ignored.
 string cnonce: Optional - Client-selected nonce. Ignored.
 string nonce: Should be the same as the nonce specified by the server.

The server will then respond with a success or failure message.

Authenticating with Username/Password

The DIGEST-MD5 SASL mechanism is available to support traditional XMPP or multi-


protocol IM clients that are not customized for (or even aware of) Facebook. This

Cara - Duzan - Liberal - Porolli - Zanuso 92/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
mechanism requires prompting the user for his or her password; therefore, it should only be
used when necessary. In particular, it MUST NOT be used for any client that:

 Proxies the XMPP connection (the connection must be directly from the user's
computer to Facebook).
 Reports messages or any other information about user activity to a third party
(including the client developer).
 Integrates with Facebook, or has a Facebook Application ID.

If your application does any of the above, you must use Facebook Platform authentication
instead.

The user's Jabber ID is simply his or her Facebook user name with @chat.facebook.com
appended. A user must have a Facebook username to use DIGEST-MD5. After the user
gets his or her username, he or she must log out of and into Facebook once for us to store
the special hash of the password.

Clients should retrieve their user's vCard from the server according to XEP-0054 in order to
be able to display a more natural name to the user. For example:

<iq id='1' type='get'><vCard xmlns='vcard-temp'/></iq>

Best Practices

In order to provide the best user experience, we recommend your chat integration do the
following:

 Your Facebook Chat integration should only be used for sessions that are expected
to be long-lived. Clients should not rapidly churn on and off.
 vCards retrieved through Facebook Chat will contain profile pictures if available.
Clients should cache these pictures using the content hash, not the user ID, as the
key. vCards should only be fetched if the client does not already have that user's
picture cached.
 Clients should not automatically reconnect if they receive a stream-error of type
conflict.
 Clients should be able to handle a single contact with multiple group elements.
 Incoming messages from the JIDs chat.facebook.com or facebook.com should be
displayed as administrative messages.

Platform Authentication Sample Code

This sample code (written in Python) demonstrates integrating Facebook Chat using the X-
FACEBOOK-PLATFORM authentication mechanism. You'll need pyxmpp and
pyfacebook before you can run this sample code. You can get pyxmpp from several

Cara - Duzan - Liberal - Porolli - Zanuso 93/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
repositories on the Web. You can get pyfacebook from GitHub; it was developed externally
and is not maintained by Facebook.

#!/usr/bin/env python

# This is a demonstration script for Facebook Chat


# using the X-FACEBOOK-PLATFORM SASL mechanism.
# It requires pyfacebook and pyxmpp to be installed.

# This client only works for desktop applications (configured in the


# developer app), and uses the old-style auth.getSession mechanism to get
a
# Facebook session. For newer-style or web apps, only the
# `get_facebook_client` function should have to change.

import sys
import os

def get_facebook_client():
import facebook
# Replace these with your app's credentials
api_key = 'YOUR_API_KEY'
secret_key = 'YOUR_API_SECRET'

client = facebook.Facebook(api_key, secret_key)

try:
# Try to read cached credentials from the session-key file.
# If authorization fails, you should delete this file and start
of.
handle = open('session-key', 'r')
client.uid, client.session_key, client.secret = [ line.strip()
for line in handle ]
handle.close()
except IOError:
client.auth.createToken()
client.login()
print 'Log in to the app in your browser, then press enter.'
raw_input()
client.auth.getSession()
handle = open('session-key', 'w')
print >> handle, client.uid
print >> handle, client.session_key
print >> handle, client.secret
handle.close()

if not int(client.users.hasAppPermission('xmpp_login')):
import webbrowser
webbrowser.open(client.get_url('authorize',
ext_perm = 'xmpp_login',
api_key = client.api_key,
v = '1.0'))

Cara - Duzan - Liberal - Porolli - Zanuso 94/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
print 'Grant the extended permission to the app in your browser,
then press enter.'
raw_input()

return client

from pyxmpp.sasl.core import ClientAuthenticator


from pyxmpp.sasl.core import Response, Failure, Success

class XFacebookPlatformClientAuthenticator(ClientAuthenticator):
def __init__(self, password_manager, fb_client=None):
ClientAuthenticator.__init__(self, password_manager)
if fb_client is None:
global global_fb_client
fb_client = global_fb_client
self._fb_client = fb_client

def start(self, ignored_username, ignored_authzid):


return Response()

def challenge(self, challenge):


in_params = dict([part.split('=') for part in
challenge.split('&amp;')])
out_params = {'nonce': in_params['nonce']}
out_params = self._fb_client._add_session_args(out_params)
out_params =
self._fb_client._build_post_args(in_params['method'], out_params)
import urllib
return Response(urllib.urlencode(out_params))

def finish(self,data):
return Success(None)

from pyxmpp.all import JID, Presence, Message


from pyxmpp.client import Client

class FacebookChatClient(Client):
def __init__(self, to_uid, message, **kwargs):
Client.__init__(self, **kwargs)
self.to_uid = to_uid
self.message = message
self.sent = False

def session_started(self):
self.get_stream().set_message_handler(`chat`, self.got_message)
self.get_stream().send(Presence())

def idle(self):
print 'Idle...'
Client.idle(self)
if self.session_established and not self.sent:
self.sent = True
target = JID('-' + self.to_uid, self.jid.domain)

Cara - Duzan - Liberal - Porolli - Zanuso 95/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
self.get_stream().send(Message(to_jid=target,
body=unicode(self.message)))

def got_message(self, stanza):


print stanza.get_from().node, `:`, stanza.get_body()

if __name__ == '__main__':
# Uncomment these lines to get more verbose logging.
#import logging
#logger = logging.getLogger()
#logger.addHandler(logging.StreamHandler())
#logger.setLevel(logging.DEBUG)

# Sneak our authenticator into the map.


import pyxmpp.sasl
pyxmpp.sasl.all_mechanisms_dict['X-FACEBOOK-PLATFORM'] = \
(XFacebookPlatformClientAuthenticator, None)

print 'Preparing Facebook client...'


global_fb_client = get_facebook_client()

try:
my_uid = str(global_fb_client.uid)
to_uid = sys.argv[1]
message = unicode(sys.argv[2])
my_jid = '-' + my_uid + '@chat.facebook.com/TestClient'
except IndexError:
sys.exit('usage: %s {to_uid} {message}' % sys.argv[0])

print 'Creating stream...'


xmpp_client = FacebookChatClient(
to_uid = to_uid,
message = message,
jid = JID(my_jid),
password = u'ignored',
auth_methods = ['sasl:X-FACEBOOK-PLATFORM'],
#server = 'localhost'
)

print 'Connecting...'
xmpp_client.connect()

print 'Processing...'
try:
xmpp_client.loop(1)
finally:
xmpp_client.disconnect()

Cara - Duzan - Liberal - Porolli - Zanuso 96/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011

Política de privacidad de Facebook

Fecha de la última revisión: 22 de diciembre de 2010.

Este documento consta de nueve secciones, y puedes ir directamente a cada una de ellas
seleccionando los enlaces siguientes:

1. Introducción
2. Información que recibimos
3. Compartir información en Facebook.
4. Información que compartes con terceros
5. Cómo utilizamos tu información
6. Cómo compartimos la información
7. Cómo puedes modificar o eliminar información
8. Cómo protegemos la información
9. Otras condiciones

1. Introducción

Preguntas. Si tienes alguna pregunta o duda sobre nuestra política de privacidad, ponte en
contacto con nuestro equipo de privacidad a través de esta página de ayuda. También
puedes contactar con nosotros por correo ordinario en 1601 S. California Avenue, Palo
Alto, CA 94304.

Programa TRUSTe. Facebook ha obtenido la certificación TRUSTe Privacy Seal. Esto


significa que TRUSTe ha verificado que esta política de privacidad y nuestras prácticas
cumplen los requisitos del programa TRUSTe. Si tienes alguna duda o queja sobre nuestra
política de privacidad o nuestras prácticas, contáctanos por correo ordinario en la siguiente
dirección: 1601 S. California Avenue, Palo Alto, CA 94304 o a través de esta página de
ayuda.  Si no te satisface nuestra respuesta, puedes ponerte en contacto con TRUSTe aquí.
Esta política de privacidad se aplica al sitio web www.facebook.com. El programa
TRUSTe sólo incluye la información recopilada a través de este sitio web, y no comprende
otros datos, como información que pudiera recopilarse a través de software descargado de
Facebook.

Cara - Duzan - Liberal - Porolli - Zanuso 97/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011

Safe Harbor. Facebook también cumple el marco Safe Harbor de la Unión Europea
desarrollado por el Departamento de Comercio de Estados Unidos en cuanto a recopilación,
uso y retención de datos pertenecientes a la Unión Europea. Como parte de nuestra
participación en Safe Harbor, nos comprometemos a resolver todos los posibles conflictos
que puedan surgir en relación con nuestras políticas y prácticas a través de TRUSTe.
Asimismo, responderemos a las solicitudes de acceso dentro de un plazo de tiempo
razonable.  Para ver nuestra certificación, entra en el sitio web del programa Safe Harbor
del Departamento de Comercio de los Estados Unidos.

Ámbito. La presente política de privacidad incluye Facebook al completo. No obstante, no


es aplicable a entidades que no sean propiedad o no se encuentren bajo el control de
Facebook, incluidos los sitios web y aplicaciones que utilicen la plataforma. Si utilizas o
accedes a Facebook, estarás aceptando las prácticas de privacidad aquí definidas.

No se acepta información de niños menores de 13 años. Si tienes menos de 13 años, no


intentes registrarte en Facebook ni nos facilites ningún dato personal. Si descubrimos que
hemos recibido información de un niño menor de 13 años, borraremos esa información lo
más rápido posible. Si crees que podría obrar en nuestro poder información procedente de
un niño menor de 13 años, ponte en contacto con nosotros a través de esta página de ayuda.

Participación de los padres. Recomendamos encarecidamente que los menores de edad, a


partir de los 13 años, pidan permiso a sus padres antes de enviar información sobre sí
mismos a través de internet, y animamos a los padres a que enseñen a sus hijos prácticas
seguras para el uso de internet. Encontrarás material de ayuda acerca de cómo los padres
pueden hablar con sus hijos sobre un uso seguro de internet en esta página de ayuda.

Cara - Duzan - Liberal - Porolli - Zanuso 98/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
2. Información que recibimos

Información que nos envías:

Información sobre ti. Cuando te registras en Facebook, nos facilitas tu nombre, correo
electrónico, sexo y fecha de nacimiento. Durante el proceso de registro, te ofrecemos la
posibilidad de conectarte a tus amigos, centros educativos y empleados. También podrás
añadir una foto. En algunos casos podríamos pedirte información adicional por motivos de
seguridad o para ofrecerte servicios específicos. Una vez registrado puedes proporcionar
otra información sobre ti relacionada, por ejemplo, con tu ciudad de residencia, ciudad de
origen, familia, relaciones, redes, actividades, intereses y lugares. También puedes indicar
tu ideología política o tus creencias religiosas.

Contenido. Una de las finalidades principales del uso de Facebook es compartir contenido
con los demás, por ejemplo, actualizar tu estado, cargar o hacer una foto, cargar o grabar un
vídeo, compartir un enlace, crear un evento o un grupo, hacer un comentario, escribir algo
en el muro de alguien, escribir una nota o enviar un mensaje. Si no deseas que guardemos
los metadatos asociados al contenido que compartes en Facebook (como las fotografías)
elimina los metadatos antes de cargar el contenido.

Información sobre transacciones. Podemos guardar los datos de las transacciones o pagos
que realices a través de Facebook. Si no deseas que almacenemos el número de cuenta de
origen de tu pago, puedes eliminarlo a través de la página de pagos.  

Información sobre amigos. Te ofrecemos herramientas de importación de contactos para


ayudarte a cargar las direcciones de tus amigos para que puedas encontrarlos en Facebook e
invitar a unirse a aquellos contactos que todavía no usen Facebook. Si no deseas que
almacenemos esta información, entra en esta página de ayuda. Si nos das tu contraseña para
obtener estos contactos, no la guardaremos una vez cargada la información de los
contactos.

Información que recopilamos cuando interactúas con Facebook:

Información sobre la actividad en el sitio web. Realizamos un seguimiento de las


acciones que llevas a cabo en Facebook, como añadir conexiones (incluido unirte a un
grupo o añadir un amigo), crear un álbum de fotos, enviar un regalo, dar un toque a otro
usuario, indicar que "te gusta" una publicación, asistir a un evento o conectarte a una
aplicación. En algunos casos, también estás llevando a cabo una acción cuando nos
proporcionas información o contenido. Por ejemplo, si compartes un vídeo, además de
almacenar el contenido real que has actualizado, podemos registrar el hecho de que lo
hayas compartido.

Acceso a la información del dispositivo y del navegador. Cuando accedes a Facebook


desde un ordenador, teléfono móvil u otro dispositivo, podemos obtener información de
dicho dispositivo sobre tu tipo de navegador, ubicación y dirección IP, así como las páginas

Cara - Duzan - Liberal - Porolli - Zanuso 99/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
que visitas.

Información sobre cookies. Utilizamos "cookies" (datos que almacenamos en tu


ordenador, teléfono móvil u otro dispositivo durante un período de tiempo prolongado) para
que Facebook sea más fácil de usar, para que nuestra publicidad sea mejor y para proteger
tanto a ti como a Facebook. Por ejemplo, las empleamos para guardar tu nombre de usuario
(pero nunca tu contraseña) de modo que te resulte más sencillo iniciar sesión cada vez que
quieras entrar en Facebook. También utilizamos las cookies para confirmar que estás
conectado a Facebook, y para saber cuándo estás interactuando con aplicaciones y sitios
web de la plataforma Facebook, nuestros widgets, botones de compartir y nuestros
anuncios. Puedes eliminar o bloquear las cookies mediante la configuración de tu
navegador, pero en algunos casos puede influir en tu capacidad de uso de Facebook.

Información que recibimos de terceros:

Plataforma de Facebook. No poseemos ni operamos las aplicaciones o sitios web que


utilizas a través de la plataforma de Facebook (como juegos y otros programas). Cuando te
conectes a un sitio web o una aplicación de la plataforma, nos suministrarán información,
incluida la información acerca de las acciones que realizas. En algunos casos, es posible
que recibamos una cantidad limitada de información antes de que te conectes a la
aplicación o sitio web para poder personalizar el proceso de conexión.

Información procedente de otros sitios web. Podemos establecer programas con socios
publicitarios y otros sitios web en los que éstos comparten información con nosotros:
 

 Podemos solicitar a los anunciantes que nos indiquen cómo nuestros usuarios han
respondido a los anuncios que les mostramos (y, con fines comparativos, cómo han
actuado en su página otros usuarios que no habían visto los anuncios). Esta compartición
de datos, denominada comúnmente "seguimiento de conversión" nos ayuda a medir la
efectividad de nuestra publicidad y a mejorar la calidad de los anuncios que ves.
 Podemos recibir información sobre si has visto o no, o si has interactuado con
determinados anuncios de otros sitios, para medir la efectividad de dichos anuncios.

Si en cualquiera de estos casos recibimos datos que todavía no tenemos, les otorgaremos el
carácter de "anónimos" en un plazo de 180 días, lo cual significa que no asociaremos la
información con ningún usuario en particular. Si establecemos dichos programas, sólo
haremos uso de la información según se explica en la sección "Cómo utilizamos tu
información" expuesta a continuación.

Información procedente de otros usuarios. Podemos recopilar información acerca de ti a


partir de otros usuarios de Facebook (como cuando un amigo te etiqueta en una foto, un
vídeo o un lugar, proporciona detalles de vuestra amistad o indica su relación contigo).

Cara - Duzan - Liberal - Porolli - Zanuso 100/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
3. Compartir información en Facebook

En esta sección se explica cómo funciona la configuración de la privacidad , y cómo se


comparte tu información en Facebook.  Antes de compartir información en Facebook debes
tener en cuenta tu configuración de la privacidad.

Nombre y foto del perfil.  Facebook ha sido diseñado para que te resulte sencillo encontrar
y conectarte a otros. Por este motivo, tu nombre y la foto de tu perfil carecen de
configuración de privacidad. Si no quieres compartir la foto de tu perfil, debes eliminarla (o
no añadir ninguna). También puedes controlar quién puede encontrarte al buscar en
Facebook o en motores de búsqueda públicos utilizando la configuración de la privacidad
de las aplicaciones y los sitios web.

Información de contacto. La configuración de tu información de contacto (disponible en


la configuración de la privacidad) controla quién puede ponerse en contacto contigo en
Facebook y quién puede ver tu información de contacto (por ejemplo, tu dirección de
correo electrónico y número de teléfono). Recuerda que esta información no es obligatoria
(excepto la dirección de correo electrónico) y que no tienes por qué compartir tu dirección
de correo electrónico con nadie.

Información personal  La configuración de tu información personal controla quién puede


ver tu información personal (por ejemplo, tus tendencias políticas y creencias religiosas) si
decides añadirla. Recomendamos compartir esta información utilizando la opción "amigos
de amigos".

Mis publicaciones.  Puedes seleccionar una configuración de privacidad para cada


publicación que realices usando el editor de nuestro sitio. Tanto si vas a cargar una foto
como a publicar una actualización de estado, puedes controlar exactamente quién puede
verla en el momento de crearla. Cada vez que compartas algo, busca el icono del candado.
Si haces clic en el candado se mostrará un menú que te permite elegir quién podrá ver tu
publicación. Si decides no seleccionar tu configuración en el momento de publicar el
contenido, dicho contenido se compartirá en consonancia con la configuración de "Mis
publicaciones"

(disponible en la configuración de la privacidad).

Sexo y fecha de nacimiento.  Además del nombre y la dirección de correo electrónico,


requerimos que nos facilites tu sexo y fecha de nacimiento durante el proceso de registro.
Te pedimos la fecha de nacimiento para comprobar que eres mayor de 13 años y, así, poder
limitar mejor el acceso a contenidos y anuncios que no sean adecuados para ciertas edades.
Puesto que tu fecha de nacimiento y sexo son obligatorios, no puedes eliminarlos. Sin
embargo, puedes editar tu perfil para ocultar todo (o parte) de dichos campos para que no
los vean otros usuarios.

Cara - Duzan - Liberal - Porolli - Zanuso 101/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011

Otros.  Otras indicaciones que debes recordar:


 

 Parte del contenido que compartes y de las acciones que llevas a cabo se mostrarán en las
páginas de inicio de tus amigos y en otras páginas que visiten.
 Si otro usuario te etiqueta en una foto, vídeo o lugar, puedes eliminar la etiqueta. 
También puedes limitar quién puede ver que has sido etiquetado en tu perfil desde la
configuración de la privacidad.
 Incluso tras haber eliminado la información de tu perfil o tras haber borrado tu cuenta, es
posible que alguna copia de dicha información permanezca visible en algún otro lugar si
ha sido compartida con otros, ha sido distribuida de algún otro modo según tu
configuración de la privacidad o ha sido copiada o almacenada por otros usuarios.
 Debes entender que la información puede ser compartida a su vez o copiada por otros
usuarios.
 Algunos tipos de comunicaciones que envías a otros usuarios no pueden eliminarse, como
por ejemplo los mensajes.
 Cuando publicas información en el perfil de otro usuario o realizas un comentario en la
publicación de otro usuario, dicha información queda sujeta a la configuración de la
privacidad del otro usuario.
 Si utilizas una fuente externa para publicar información en Facebook (como una
aplicación móvil o un sitio web de Connect) debes comprobar la configuración de
privacidad de dicha publicación, puesto que la establece la fuente externa.

Información de “Todos”. La información configurada como “todos” está disponible


públicamente, como tu nombre, foto de perfil y conexiones.  Dicha información permanece
accesible y visible para todo aquel que entre en internet (incluidas las personas no
registradas en Facebook), queda sujeta a indexación por parte de motores de búsqueda de
terceros y puede ser importada, exportada, distribuida y redistribuida por nosotros y otros
sin limitaciones de privacidad. Dicha información puede asociarse contigo, incluido tu
nombre y fotografía de perfil, incluso fuera de Facebook, por ejemplo, en motores de
búsqueda públicos y cuando visites otros sitios de Internet. La configuración de privacidad
predeterminada para ciertos tipos de información que publicas en Facebook está establecida
en “todos”. Puedes revisar y modificar la configuración predeterminada en tu configuración
de la privacidad. Si eliminas el contenido compartido con "todos" previamente publicado
en Facebook, lo borraremos de tu perfil de Facebook, pero no podemos controlar su uso
fuera de Facebook.

Menores.  Nos reservamos el derecho de aplicar métodos de protección especial para


menores (como proporcionarles un contenido adecuado a su edad) y aplicar restricciones a
la capacidad que tienen los adultos para compartir y conectarse a menores, reconociendo
que esto puede suponer para los menores una experiencia más limitada en Facebook.

Cara - Duzan - Liberal - Porolli - Zanuso 102/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
4. Información que compartes con terceros

Platforma de Facebook.  Como ya hemos mencionado, no operamos los sitios web y


aplicaciones que utilizan la plataforma de Facebook ni somos sus propietarios. Esto
significa que al utilizar estas aplicaciones y sitios web, tu información de Facebook no está
sólo disponible para Facebook. Antes de permitir el acceso a cualquier información sobre
ti, les requerimos que acepten una serie de condiciones que limitan su uso de tu
información (puedes consultar estas condiciones en la sección 9 de nuestra Declaración de
derechos y responsabilidades) y ponemos en práctica medidas técnicas para garantizar que
sólo obtienen información autorizada.  Para obtener más información sobre la plataforma,
visita la página Acerca de la plataforma.

Conexión a una aplicación o sitio web.   Cuando te conectas a una aplicación o sitio web,
éstos tendrán acceso a Información general sobre ti. El término Información general incluye
tu nombre y los nombres de tus amigos, fotografías de perfil, sexo, identificador de usuario,
conexiones y cualquier contenido compartido usando la configuración de privacidad
“Todos”. Para ayudar a estos sitios web y aplicaciones a poner en práctica medidas de
seguridad y controlar la distribución de contenido apropiado a usuarios de diferentes
edades, podemos poner a su disposición otra información, como datos técnicos, la
localización de tu equipo informático o dispositivo de acceso, así como tu edad. Asimismo,
las aplicaciones o sitios web que aceptan créditos pueden acceder a tu saldo de créditos. Si
la aplicación o el sitio web desea acceder a otros datos, tendrá que pedirte permiso.

Te proporcionamos herramientas para controlar cómo compartes tu información con


aplicaciones y sitios web que utilizan la plataforma. Por ejemplo, puedes bloquear
completamente el acceso a tus datos de todos los sitios web y aplicaciones, o bien bloquear
aplicaciones específicas en la configuración de la privacidad de las aplicaciones y los sitios
web, o en la página "Acerca de" de la aplicación.  También puedes utilizar tu configuración
de la privacidadpara limitar qué parte de tu información está disponible para “todos”.

Aconsejamos que leas siempre las políticas de los sitios web y las aplicaciones de terceros
para cerciorarte de que estás de acuerdo con el modo en el que usan la información que
compartes con ellos. Facebook no puede garantizar que estos sitios web o aplicaciones
cumplirán nuestras normas. Si encuentras alguna aplicación o sitio web que infringe
nuestras normas, infórmanos de este incumplimiento en esta página de ayuday tomaremos
las medidas oportunas.

Cuando tus amigos utilizan la plataforma. Si tu amigo se conecta a una aplicación o sitio
web, éstos podrán acceder a tu nombre, fotografía del perfil, sexo, ID de usuario y aquella
información que hayas compartido con "todos". También podrán acceder a tus conexiones,
pero no podrán acceder a tu lista de amigos. Si ya te has conectado a ese sitio web o
aplicación (o dispones de otra cuenta en estos lugares), es posible que éstos también puedan
conectarse con tu amigo a través de ese sitio web o aplicación. Si la aplicación o el sitio
web desean acceder a cualquier otro contenido o información tuya (incluida tu lista de

Cara - Duzan - Liberal - Porolli - Zanuso 103/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
amigos), tendrá que obtener permiso específico de tu amigo. Si tu amigo concede permiso a
la aplicación o al sitio web, sólo podrán acceder a contenido e información sobre ti a la que
tu amigo pueda acceder. Además, sólo podrán utilizar dicho contenido y dicha información
en conexión con ese amigo. Por ejemplo, si un amigo facilita a una aplicación acceso a una
fotografía que sólo compartes con tus amigos, dicha aplicación puede permitir a tu amigo
ver o imprimir la fotografía, pero no puede mostrársela a nadie más.

Te proporcionamos una serie de herramientas para controlar cómo se comparte tu


información cuando tu amigo se conecta a una aplicación o sitio web. Por ejemplo, puedes
utilizar la configuración de privacidad de tus aplicaciones y sitios web para limitar qué
información pueden poner tus amigos a disposición de las aplicaciones y los sitios web.
Puedes bloquear el acceso a tu información de todas las aplicaciones y sitios web de la
plataforma, o de aplicaciones o sitios web concretos. Puedes utilizar tu configuración de la
privacidad para limitar los amigos que pueden acceder a tu información o limitar qué parte
de tu información está disponible para "todos". También puedes desconectarte de un amigo
si no estás de acuerdo con el modo en que utiliza tu información.

Sitios web y aplicaciones de terceros aprobados previamente.  Para proporcionarte


experiencias sociales útiles fuera de Facebook, en ocasiones necesitamos proporcionar
Información general sobre ti a sitios web y aplicaciones de terceros aprobados previamente
que utilizan la plataforma cuando los visitas (si aún tienes una sesión iniciada en
Facebook). Del mismo modo, cuando uno de tus amigos visita un sitio web o aplicación
aprobados previamente, recibirá información general sobre ti para que podáis conectaros
también a través de ese sitio web (si también dispones de una cuenta en dicho sitio web).
En estos casos, requerimos que estos sitios web y estas aplicaciones se sometan a un
proceso de aprobación y participen en diferentes acuerdos con el objetivo de proteger tu
privacidad. Por ejemplo, estos acuerdos incluyen disposiciones relativas al acceso y
eliminación de tu Información general, así como la posibilidad de rechazar la participación
en la experiencia ofrecida. Puedes inhabilitar la personalización instantánea de todos los
sitios web y aplicaciones aprobados previamente mediante la configuración de la
privacidadde las aplicaciones y los sitios web. También puedes bloquear un sitio web o una
aplicación que han recibido autorización previa haciendo clic en "No, gracias", que verás
en la barra de color azul de la aplicación o sitio web concreto. Además, si cierras la sesión
de Facebook antes de visitar un sitio web o aplicación aprobados previamente, éstos no
podrán acceder a tu información.

Exportación de información. Puedes (al igual que todos aquellos a cuya disposición has
puesto tu información) utilizar herramientas como fuentes RSS, aplicaciones de libretas de
direcciones del teléfono móvil o funciones de copiar y pegar, para obtener y exportar (y en
algunos casos, importar) información de Facebook, incluida tu propia información y todos
los datos sobre tu persona. Por ejemplo, si compartes tu número de teléfono con tus amigos,
éstos pueden utilizar aplicaciones de terceros para sincronizar dicha información con la
libreta de direcciones de sus teléfonos móviles.

Cara - Duzan - Liberal - Porolli - Zanuso 104/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011

Publicidad. En ocasiones, los anunciantes que presentan publicidad en Facebook emplean


métodos tecnológicos para medir la efectividad de sus anuncios y personalizar el contenido
publicitario. Puedes renunciar a la fijación de cookies de numerosos anunciantes haciendo
clic aquí. También puedes usar la configuración de cookies de tu navegador para limitar o
evitar la fijación de cookies por parte de redes publicitarias. Facebook no comparte con los
anunciantes información que te identifica personalmente salvo si obtenemos tu
autorización.

Enlaces. Al hacer clic en algunos enlaces de Facebook, es posible que te lleven fuera de
nuestro sitio web. No nos hacemos responsables de las políticas de privacidad de otros
sitios web, y te animamos a que leas sus normas de privacidad.

5. Cómo utilizamos tu información

Utilizamos la información que recopilamos para tratar de ofrecerte una experiencia segura,
eficaz y personalizada. A continuación, incluimos algunos datos sobre cómo lo hacemos:

Para gestionar el servicio. Utilizamos la información que recopilamos para ofrecerte


nuestros servicios y funciones, evaluarlos y mejorarlos y prestarte servicio técnico.
Empleamos la información para impedir actividades que podrían ser ilegales y para aplicar
nuestra Declaración de derechos y responsabilidades. También utilizamos una serie de
sistemas tecnológicos para detectar y ocuparnos de actividades y contenido en pantalla
anómalos con el fin de evitar abusos como el correo basura. Estos esfuerzos pueden
provocar, en ocasiones, el fin o la suspensión temporal o permanente de algunas funciones
para algunos usuarios.

Para ponernos en contacto contigo. Ocasionalmente, podemos ponernos en contacto


contigo para informarte de anuncios relativos a servicios. Puedes optar por no recibir
ninguna comunicación salvo actualizaciones esenciales en la página de notificaciones de la
cuenta. En los mensajes de correo electrónico que te enviemos, podemos incluir contenido
que veas en Facebook.

Para ofrecerte anuncios personalizados. No compartimos información tuya con


anunciantes sin tu consentimiento. (Un ejemplo de consentimiento sería que nos pidieses
que suministrásemos tu dirección de envío a un anunciante para recibir una muestra
gratuita.) Permitimos a los anunciantes elegir las características de los usuarios que verán
sus anuncios y podemos utilizar cualquiera de los atributos que hayamos recabado que no te
identifiquen personalmente (como información que puedas haber decidido no mostrar a
otros usuarios, por ejemplo, el año de nacimiento) para seleccionar el público apropiado
para dichos anuncios. Por ejemplo, podríamos utilizar tu interés por el fútbol para mostrarte
anuncios de equipamiento de fútbol, pero no le decimos a la empresa que vende el
equipamiento quién eres. Puedes consultar los criterios que pueden seleccionar los

Cara - Duzan - Liberal - Porolli - Zanuso 105/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
anunciantes visitando nuestra página de publicidad. Aunque no compartimos tu
información con anunciantes sin tu consentimiento, cuando hagas clic en un anuncio o
interactúes de otro modo con éste, existe la posibilidad de que el anunciante pueda colocar
una cookie en tu navegador y tomar nota de que cumple los criterios que ha seleccionado.

Para ofrecer anuncios sociales. En ocasiones, emparejamos los anuncios que ofrecemos
con información pertinente que poseemos sobre ti y sobre tus amigos para que los anuncios
resulten más interesantes y se adapten mejor a ti y a tus amigos. Por ejemplo, si te conectas
a la página de tu grupo de música favorito, podemos mostrar tu nombre y la foto de tu perfil
al lado de un anuncio de dicha página que verán tus amigos. Sólo compartimos la
información personal visible en el anuncio social con el amigo que puede ver el anuncio.
Puedes optar por que tu información no sea utilizada en anuncios sociales en esta página de
ayuda.

Para complementar tu perfil. Podemos utilizar información acerca de ti que recabemos de


otros usuarios de Facebook para completar tu perfil (por ejemplo, cuando se te etiqueta en
una foto o se te menciona en una actualización de estado). En tales casos, generalmente te
permitimos eliminar el contenido (por ejemplo, permitiéndote eliminar la etiqueta de una
foto tuya) o limitar la visibilidad de tu perfil.

Para hacer sugerencias.  Utilizamos tu información, incluidas las direcciones que


importas a través de las herramientas de importación de contactos, para hacerte sugerencias
a ti y a otros usuarios de Facebook. Por ejemplo, si otro usuario importa la misma dirección
de correo electrónico que tú, podemos sugeriros a ambos que añadáis al otro a vuestra lista
de amigos. También, si un amigo tuyo carga una foto en la que apareces, podemos sugerirle
que te etiquete en ella. Para hacer esto, comparamos las fotos de tu amigo con información
recopilada de las fotos en las que se te ha etiquetado. También podemos sugerirte que uses
herramientas o funciones concretas, según lo que utilicen tus amigos. Para controlar si
podemos sugerir o no a otro usuario que te añada como amigo, ve a la opción "Buscarte en
Facebook" de tu configuración de privacidad. También puedes controlar si sugerimos o no
a otros usuarios que te etiqueten en una foto haciendo clic en "Personalizar la
configuración" en la página de configuración de la privacidad.

Para ayudar a tus amigos a encontrarte. Permitimos a otros usuarios utilizar información
de contacto que tengan sobre ti (como tu dirección de correo electrónico) para encontrarte,
incluso a través de herramientas de importación y búsqueda de contactos. Puedes impedir
que otros usuarios utilicen tu dirección de correo electrónico para encontrarte en la sección
de búsquedas de tu configuración de la privacidad.

Software descargable. Algunas aplicaciones de software descargables y applets que


ofrecemos, como las barras de herramientas del navegador y las herramientas para cargar
fotos, nos transmiten datos. Podemos no realizar ninguna declaración formal si creemos que
la recopilación y uso de información por nuestra parte es el fin obvio de la aplicación, por
ejemplo, el hecho de recibir fotografías cuando se utiliza la herramienta para cargar fotos.

Cara - Duzan - Liberal - Porolli - Zanuso 106/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
Si creemos que no resulta obvio que estemos recopilando o utilizando dicha información, te
avisaremos la primera vez que nos facilites la información, de tal manera que puedas
decidir si deseas utilizar esa función.

Cuentas in memoriam. Si se nos notifica que un usuario ha fallecido, podemos convertir


su cuenta en una cuenta conmemorativa. En tales casos, restringimos el acceso al perfil a
los amigos confirmados y permitimos a éstos y a los familiares que escriban en el muro del
usuario en recuerdo suyo. Podemos cerrar una cuenta si recibimos una solicitud formal de
un pariente del usuario u otra solicitud legal pertinente para hacerlo.

6. Cómo compartimos la información

Facebook se basa en compartir información con otros (amigos y personas de tu entorno) al


tiempo que se te ofrece una configuración de la privacidadque puedes utilizar para
restringir el acceso de otros usuarios a tu información.. Compartimos tu información con
terceros cuando creemos que dicha acción está permitida por ti, que es razonablemente
necesaria para ofrecer nuestros servicios o cuando se nos exige legalmente que lo hagamos.
Por ejemplo:

Cuando realizas un pago. Cuando realices transacciones con otras personas o efectúes
pagos en Facebook, sólo compartiremos la información de la transacción con los terceros
que sean necesarios para completar la transacción. Requeriremos que los terceros acuerden
respetar la privacidad de la información.

Cuando invitas a un amigo a que se una a Facebook. Cuando nos pides que invitemos a
un amigo a que se una a Facebook, le enviaremos un mensaje de tu parte, usando tu
nombre. La invitación también puede contener información sobre otros usuarios que tu
amigo pueda conocer. También le enviamos hasta dos recordatorios en tu nombre. Puedes
ver quién ha aceptado tus invitaciones, enviar recordatorios y eliminar las direcciones de
correo electrónico de tus amigos en la página del historial de invitaciones.  Si tu amigo no
quiere que conservemos su información, la eliminaremos a petición suya en esta página de
ayuda.

Cuando eliges compartir tu información con comerciantes. Puedes elegir compartir


información con comerciantes o proveedores de comercio electrónico no asociados con
Facebook a través de ofertas en el sitio web. Esto será a tu entera discreción y no le
suministraremos información tuya a dichos comerciantes sin tu consentimiento.

Para ayudar a tus amigos a encontrarte. De forma predeterminada, incluimos cierta


información que has colocado en tu perfil en los resultados de búsqueda de Facebook para
ayudar a tus amigos a encontrarte. Sin embargo, puedes controlar quién puede ver alguna
de esta información, así como quién puede encontrarte en búsquedas, a través de la
configuración de la privacidad. También colaboramos con proveedores de mensajería
instantánea y correo electrónico para ayudar a sus usuarios a identificar cuáles de sus

Cara - Duzan - Liberal - Porolli - Zanuso 107/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
contactos son usuarios de Facebook, de forma que podamos promocionar Facebook a
dichos usuarios.

Para dar a los motores de búsqueda acceso a información públicamente disponible. En


general, restringimos el acceso de los motores de búsqueda a nuestro sitio web. Podemos
permitirles acceder a información configurada con la opción "todos" (junto con tu nombre y
fotografía de perfil) y a la información de tu perfil que sea visible para todos. Puedes
cambiar la visibilidad de parte de la información de tu perfil en la sección de
personalización de la configuración de la privacidad. También puedes impedir que los
motores de búsqueda sometan a indexado tu perfil en la configuración de la privacidad de
las aplicaciones y los sitios web.

Para ayudar a mejorar o promocionar nuestro servicio. A veces compartimos datos


agregados o anónimos con terceros para ayudar a mejorar o promocionar nuestro servicio.
Sin embargo, sólo lo hacemos de tal manera que no se pueda identificar a ningún usuario en
particular ni vincularse a éste con ninguna información o acción específica.

Para prestarte servicios. Podemos ofrecer información a proveedores de servicios que nos
ayudan a facilitarte los servicios que ofrecemos. Por ejemplo, podemos utilizar a terceros
para alojar nuestro sitio web, enviar actualizaciones por correo electrónico acerca de
Facebook, eliminar información repetitiva de nuestras listas de usuarios, procesar pagos u
ofrecer enlaces o resultados de búsqueda (lo que incluye enlaces promocionados). Estos
proveedores de servicios pueden tener acceso a tu información personal para utilizarla
durante un período de tiempo limitado, pero cuando esto ocurre, implantamos sistemas de
protección técnicos y contractuales razonables para restringir su uso de dicha información a
la ayuda que nos prestan para ofrecer el servicio.

Para publicitar nuestros servicios. Podemos pedir a anunciantes ajenos a Facebook que
muestren anuncios para promocionar nuestros servicios. Podemos pedirles que entreguen
dichos anuncios basándose en la presencia de una cookie, pero al hacerlo, no se compartirá
ninguna otra información con el anunciante.

Para ofrecer servicios conjuntos. Podemos prestar servicios de forma conjunta con otras
empresas, como se el caso del servicio de clasificados del Marketplace de Facebook. Si
utilizas estos servicios, podemos compartir tu información para facilitar dicho servicio. Sin
embargo, identificaremos al socio y te presentaremos la política de privacidad del
proveedor de servicios conjuntos antes de que utilices dicho servicio.

Para responder a requerimientos legales y evitar daños. Podemos revelar información


con arreglo a citaciones, órdenes judiciales u otros requerimientos (incluidos asuntos civiles
y penales) si creemos de buena fe que la ley exige dicha respuesta. Esto puede incluir
respetar requerimientos de jurisdicciones ajenas a los Estados Unidos cuando creamos de
buena fe que las leyes locales de tal jurisdicción exigen dicha respuesta, son aplicables a
usuarios de dichas jurisdicción y resultan coherentes con estándares internacionales

Cara - Duzan - Liberal - Porolli - Zanuso 108/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
generalmente aceptados. También podemos compartir información si creemos de buena fe
que resulta necesario para impedir un fraude u otra actividad ilegal, evitar un daño físico
inminente o protegernos tanto a nosotros como al usuario de personas que infrinjan nuestra
Declaración de derechos y responsabilidades. Esto puede incluir compartir información con
otras empresas, abogados, tribunales u otras entidades gubernamentales.

Transferencia en caso de venta o cambio de control. If the ownership of all or


substantially all of our business changes, we may transfer your information to the new
owner so that the service can continue to operate. En tal caso, tu información seguiría
estando sujeta a las promesas efectuadas en la Política de privacidad preexistente.

7. Cómo puedes cambiar eliminar información

Edición de tu perfil. Puedes cambiar o eliminar la información de tu perfil en cualquier


momento yendo a la página de tu perfil y haciendo clic en “Editar mi perfil”. La
información se actualizará de inmediato.

Eliminar los contactos cargados. Si utilizas nuestra herramienta para importar contactos
con el fin de cargar direcciones, después puedes eliminar la lista en esta página de ayuda. 
Puedes eliminar las direcciones de correo electrónico de amigos que hayas invitado a unirse
a Facebook en tu página del historial de invitaciones.

Desactivación o eliminación de la cuenta. Si quieres dejar de utilizar tu cuenta, puedes


desactivarla o eliminarla. Cuando desactivas una cuenta, ningún usuario podrá verla, pero
no será eliminada. Guardamos la información de tu perfil (conexiones, fotos, intereses, etc.)
por si más tarde decides volver a activarla. Muchos usuarios desactivan sus cuentas por
motivos temporales y al hacerlo, nos piden que mantengamos su información hasta que
vuelvan a Facebook. Seguirás pudiendo reactivar la cuenta y restaurar tu perfil en su
totalidad. Cuando eliminas una cuenta, se borra de forma permanente. Sólo deberías
eliminar tu cuenta si estás seguro de que nunca querrás reactivarla. Puedes desactivar la
cuenta en la página de configuración de la cuentao eliminar tu cuenta en esta página de
ayuda.

Limitaciones sobre la eliminación. Incluso después de eliminar información de tu perfil o


eliminar tu cuenta, pueden permanecer copias de dicha información visibles en otro lugar
en la medida en que se haya compartido con otros, se haya distribuido de otro modo
conforme a tu configuración de la privacidad, o haya sido copiada o almacenada por otros
usuarios. Sin embargo, tu nombre dejará de estar asociado con dicha información en
Facebook. (Por ejemplo, si publicas algo en el perfil de otro usuario y después eliminas tu
cuenta, dicha publicación podría permanecer, pero atribuirse a un “Usuario de Facebook
anónimo.”) Asimismo, podemos conservar cierta información para evitar el robo de
identidades y otras conductas inadecuadas, incluso si se ha solicitado la eliminación. Si has
facilitado a aplicaciones o sitios web de terceros acceso a tu información, éstos pueden
conservar tu información hasta el límite permitido por sus condiciones de servicio o

Cara - Duzan - Liberal - Porolli - Zanuso 109/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
políticas de privacidad. Sin embargo, después de desconectarte de ellos, ya no podrán
acceder a la información a través de nuestra plataforma.

Copias de seguridad. La información eliminada y borrada puede permanecer en copias de


seguridad hasta un máximo de 90 días, pero no estará disponible para los demás.

Información de contacto de no usuarios. Si un usuario nos facilita tu dirección de correo


electrónico, pero no eres usuario de Facebook y quieres que la eliminemos, puedes hacerlo
en esta página de ayuda. Sin embargo, esa solicitud sólo se aplicará a las direcciones que
tengamos en el momento de la solicitud y no a ninguna dirección que los usuarios nos
faciliten posteriormente.

8. Cómo protegemos la información

Hacemos todo lo posible para mantener a salvo tu información, pero necesitamos tu ayuda.
Para obtener información más pormenorizada sobre cómo mantener la seguridad en
Facebook, visita la página Security Page de Facebook.

Medidas que tomamos para mantener a salvo su información. Mantenemos la


información de tu cuenta en un servidor protegido con un firewall. Cuando introduces
información confidencial (por ejemplo, contraseñas y números de tarjeta de crédito), la
ciframos usando tecnología de capa de socket seguro (SSL). También utilizamos medidas
sociales y automatizadas para aumentar la seguridad (como el análisis de la actividad de la
cuenta por si hubiera algún comportamiento fraudulento o anómalo de otro tipo), podemos
limitar el uso de funciones del sitio web en respuesta a posibles signos de abuso, podemos
eliminar contenido inadecuado o enlaces a contenido ilegal, y podemos suspender o
desactivar cuentas por si hubiera violaciones de nuestra Declaración de derechos y
responsabilidades.

Riesgos inherentes a compartir información. Aunque te permitimos definir opciones de


privacidad que limiten el acceso a tu información, ten en cuenta que ninguna medida de
seguridad es perfecta ni impenetrable. No podemos controlar las acciones de otros usuarios
con los que compartas información. No podemos garantizar que sólo vean tu información
personas autorizadas. No podemos garantizar que la información que compartas en
Facebook no pase a estar disponible públicamente. No somos responsables de que ningún
tercero burle cualquier configuración de la privacidad o medidas de seguridad en Facebook.
Puedes reducir estos riesgos utilizando hábitos de seguridad de sentido común como elegir
una contraseña segura, utilizar contraseñas diferentes para servicios diferentes y emplear
software antivirus actualizado.

Informar de incumplimientos. Deberías informarnos de cualquier incumplimiento de la


seguridad en esta página de ayuda.

Cara - Duzan - Liberal - Porolli - Zanuso 110/113 Sistema: GALÁCTICA


Ingeniería en Sistemas de Información PROYECTO - 2011
9. Otras condiciones

Cambios. Podemos cambiar esta Política de privacidad conforme a los procedimientos


señalados en la Declaración de derechos y responsabilidades. Salvo indicación en contrario,
nuestra política de privacidad en vigor se aplica a toda la información que tenemos sobre ti
y tu cuenta. Si realizamos cambios en esta Política de privacidad, te lo notificaremos
publicándolo aquí y en la página Facebook Site Governance. Si los cambios son
sustanciales, mostraremos un aviso prominente si las circunstancias lo requieren. Puedes
asegurarte de que recibes notificación directamente haciendo clic en el botón "Me gusta" de
la página Facebook Site Governance.

Consentimiento para la recopilación y procesamiento en Estados Unidos. Al utilizar


Facebook, das tu consentimiento para que tus datos personales sean transferidos y
procesados en Estados Unidos.

Términos definidos. "Nos," "nosotros," "nuestro," "Plataforma" y "Facebook" significan lo


mismo que en la Declaración de derechos y responsabilidades. “Información” y
“contenido” se utilizan de forma más general e intercambiable aquí que en la Declaración
de derechos y responsabilidadessalvo que el contexto lo limite de otro modo.

Cara - Duzan - Liberal - Porolli - Zanuso 111/113 Sistema: GALÁCTICA

Potrebbero piacerti anche