• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Facebook api além de meros usuários
 

Facebook api além de meros usuários

on

  • 426 views

 

Statistics

Views

Total Views
426
Views on SlideShare
424
Embed Views
2

Actions

Likes
0
Downloads
0
Comments
0

1 Embed 2

http://192.168.33.10 2

Accessibility

Upload Details

Uploaded via as Adobe PDF

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 api além de meros usuários Facebook api além de meros usuários Presentation Transcript

    • FacebookAPIAlém de meros usuários!
    • AgendaFacebook DevelopersFacebook APILogin/LogoutGraph APIDialogsMétodos ÚteisOutros RecursosFQLFacebook 3.0Outros Tópicos
    • FD - Tipos de App• Web Site1• Mobile2• Aplicativos no Facebook3132
    • FD - Arquitetura• Aplicação Server-Side• Aplicação ClientApp ID
    • FD – Criando uma App
    • API – Configurando SSO Debug Log Data Setup Using the Keytool
    • API – Criando SDK e referenciando
    • API - com.facebook.android.Facebookprivate Facebook facebook;private String appId = "401023869969260";
    • API – Login/Logout authorize(Activity activity, Facebook.DialogListener listener) authorize(Activity activity, String permissions, Facebook.DialogListenerlistener) authorize(Activity activity, String permissions, int activityCode,Facebook.DialogListener listener)
    • API – Login/Logoutprivate String[] PERMISSIONS = {"read_friendlists", "publish_stream"};facebook.authorize(this, PERMISSIONS, new DialogListener() {@Overridepublic void onComplete(Bundle values) {}@Overridepublic void onFacebookError(FacebookError error) {}@Overridepublic void onError(DialogError e) {}@Overridepublic void onCancel() {}});
    • API – Login/Logoutlogout(Context context, AsyncFacebookRunner.RequestListenerlistener)AsyncFacebookRunner asyncRunner = newAsyncFacebookRunner(facebook);asyncRunner.logout(this, listener);
    • Graph API - Requestrequest(String graphPath, Bundle parameters,AsyncFacebookRunner.RequestListener listener)Bundle params = new Bundle();params.putString("fields", "name");AsyncFacebookRunner asyncRunner = new AsyncFacebookRunner(facebook);asyncRunner.request("me/friends", params, new AsyncFacebookRunner.RequestListener() {@Overridepublic void onMalformedURLException(MalformedURLException e, Object state) {}@Overridepublic void onIOException(IOException e, Object state) {}@Overridepublic void onFileNotFoundException(FileNotFoundException e, Object state) {}@Overridepublic void onFacebookError(FacebookError e, Object state) {}@Overridepublic void onComplete(String response, Object state) {}});
    • Graph API - Requestrequest(String graphPath, Bundle parameters,AsyncFacebookRunner.RequestListener listener)// get information about the currently logged in userasyncRunner.request("me", new meRequestListener());// get the posts made by the "platform" pageasyncRunner.request("platform/posts", new pageRequestListener());// get the logged-in users friendsasyncRunner.request("me/friends", new friendsRequestListener());
    • API - Dialogdialog(Context context, String action, Bundle parameters,Facebook.DialogListener listener)Bundle params = new Bundle();params.putString("to", String.valueOf(userId));facebook.dialog(context, "feed", params, dialogListener);
    • API – Métodos ÚteisisSessionValid()authorizeCallback(int requestCode, int resultCode, Intent data)extendAccessToken(Context context, Facebook.ServiceListenerserviceListener)extendAccessTokenIfNeeded(Context context,Facebook.ServiceListener serviceListener)
    • Outros Recursos - Graph APIMessage (Others Users, Threads)AlbumEventFacebook PageQuestionsPaginaçãoRealtime Updateshttps://developers.facebook.com/docs/reference/api/
    • FQL – Facebook Query LanguageString query = "SELECT name FROM user WHERE uid = me()";Bundle params = new Bundle();params.putString("method", "fql.query");params.putString("query", query);AsyncFacebookRunner asyncRunner = new AsyncFacebookRunner(facebook);asyncRunner.request(params, listener);Result: [{"name":“Aécio Costa"}]
    • FQL – Facebook Query LanguageMulti-Query"query1":"SELECT uid, rsvp_status FROM event_memberWHERE eid=12345678""query2":"SELECT name, url, pic FROM profileWHERE id IN (SELECT uid FROM #query1)"http://developers.facebook.com/docs/reference/fql/
    • Facebook 3.0Simplified user session managementReady-to-Use native UI viewsBetter Facebook APIs support
    • Facebook 3.0
    • Outros TópicosInternacionalizaçãoFacebook Chat APIFacebook Payments