Facebook's Apps II part
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Facebook's Apps II part

on

  • 1,714 views

 

Statistics

Views

Total Views
1,714
Views on SlideShare
1,714
Embed Views
0

Actions

Likes
0
Downloads
8
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Facebook's Apps II part Presentation Transcript

  • 1. DESARROLLO DE APLICACIONES
  • 2. API
    XFBML
    Graph
    FQL
  • 3. FQL
    http://developers.facebook.com/docs/reference/fql/
    http://developers.facebook.com/docs/reference/rest/fql.query
  • 4. FQL Tables
    metrics
    note
    page
    page_admin
    page_fan
    permissions
    photo
    photo_tag
    profile
    standard_user_info
    status
    stream
    stream_filter
    user
    album
    comment
    cookies
    connection
    event
    event_member
    friend
    friend_request
    friendlist
    friendlist_member
    group
    group_member
    link
  • 5.
  • 6.
  • 7.
  • 8.
  • 9. ALGUNOS MÉTODOS ÚTILES
  • 10. Extraer 10 nombres de mis amigos
    SELECT uid2 fromfriendwhere uid1= MI_UID ORDER BY rand() LIMIT 10
    Extraer mi fecha de cumpleaños y dónde vivo
    SELECT concat(first_name," ","cumpleanios en ",birthday," y vive en ",hometown_location.city) from user where uid=MI_UID
    Extraer la fecha de cumpleaños y lugar dónde viven 5 amigos
    SELECT concat(first_name," ","cumpleanios en ",birthday," y vive en ",hometown_location.city) from user where uid in (SELECT uid2 fromfriendwhere uid1= MI_UID ORDER BY rand() LIMIT 5)
  • 11. Extraer nombres de los grupos a los que pertenezco
    SELECT name FROM group WHERE gid IN (SELECT gid FROM group_member WHERE uid = MI_UID)
    Extraer los nombres de mis amigos que cumplen anios hoy
    SELECT name FROM user WHERE strpos(birthday, “MES DIA") = 0 AND uid IN (SELECT uid2 FROM friend WHERE uid1 = MI_UID)
  • 12. Realizar los Siguientes QUERYS
    1.-Extraer los nombres de los gruposquetucompartes con un amigo(aleatorio)
    2.- Extraer los nombres de los amigos quesuscumples son hoy y tienen 22 anios
  • 13. Respuesta de QUERYS
    1.-Extraer los nombres de los gruposquetucompartes con un amigo(aleatorio)
    SELECT name
    FROM group
    WHERE gid IN ( SELECT gid
    FROM group_member
    WHERE uid=MI_UID
    AND
    gid IN (SELECT gid
    FROM group_member
    WHERE uid in (SELECT uid2 fromfriendwhere uid1= MI_UID ORDER BY rand() LIMIT 1)))
  • 14. Respuesta de QUERYS
    2.- Extraer los nombres de los amigos quesuscumples son hoy y tienen 22 anios:
    SELECT name FROM user WHERE strpos(birthday, “MES DIA, ANIO") = 0 AND uid IN (SELECT uid2 FROM friend WHERE uid1 =MI_UID)
  • 15. Graph Api
    http://developers.facebook.com/docs/api
  • 16. Graph Api
  • 17. XFBML
    http://wiki.developers.facebook.com/index.php/XFBML
    http://developers.facebook.com/docs/reference/fbml/
  • 18. Rendering XFBML
    In order for the user's browser to correctly recognize XFBML tags, you need to specify that the page is in XHTML. Within the <html> tag, add this attribute:
  • 19. Rendering XFBML
    In each file, you need to refer to the Facebook JavaScript Feature Loader file, FeatureLoader.js.php. This will allow your site access to all of the features of Facebook Connect in JavaScript, like XFBML, JavaScript API calls, and so forth. This script should be referenced in the BODY of your file, not in the HEAD (for the best performance, put this code right after the <body> tag in the file.).
    <script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>
  • 20. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    </head>
    <body>
    <script type="text/javascript"
    src="http://connect.facebook.net/en_US/all.js">
    </script>
    <script type="text/javascript">
    FB.init({
    appIdMyAppId,
    status : true, // check login status
    cookie : true, // enable cookies to allow the server to access the session
    xfbml : true // parse XFBML
    });
    </script>
    </body>
    </html>