Your SlideShare is downloading. ×
  • Like

Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Virtual Tech Days 2010 - Integrating Social Networks with ASP.NET

  • 7,975 views
Published

 

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
7,975
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
13
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Integrating Social Networks with ASP.NET Krishna Chaitanya T │ Future Web Research Lab, SETLabs, Infosys WE ♥ SOCIAL virtual techdays INDIA │ 22-24 November 2010
  • 2.
    • Overview of the social web
      • Trends, Platforms and APIs
    • Enhancing websites with social experiences
      • Facebook for websites
      • Twitter widgets
    • Fun with Facebook’s Open Graph API
      • App setup in FB platform
      • jQuery + JavaScript SDK
    • The oAuth handshake flow
    • Implementing FB oAuth using C#
    S E S S I O N A G E N D A INDIA │ 22-24 November 2010 WE ♥ SOCIAL virtual techdays
  • 3.
    • Trends
      • Web 1.0: Static, centralized, users read content, publishing rather than participation.
      • Web 2.0: Dynamic, decentralized, AJAX, widgets, sharing, mashups, mobile, real time, collective minds, interactive, location based
    • Platforms
      • Facebook : Building social connections. Emphasizes profiles & people
      • Twitter : Information network. Emphasizes content
      • Foursquare : Location based social networking
      • LinkedIn , MySpace , NetFlix , Flickr , Delicious , Digg etc
    • APIs
      • Every social network has its own REST based API, (mostly) sticking to open standards.
      • This session concentrates on: Facebook Graph API , Twitter API for ASP.NET sites.
    Overview of the social web INDIA │ 22-24 November 2010 WE ♥ SOCIAL virtual techdays
  • 4.
    • Websites can be made more social and interactive within minutes
    • Facebook social plugins for websites
      • Extensions of facebook, very simple code
      • Login button – login to your site with FB auth
      • Like Button – share pages from your site to FB
      • Others include: Comments, Activity Feed, Like Box, Face Pile, Live Stream
      • Open Graph <meta> tags make your page equivalent to FB page
    • Twitter Everywhere/widgets
      • Twitter updates on your website
      • Search Widget – display real time tweets for live events
      • Facebook-Twitter Integration app
    • For more control & customization, we need to play with core APIs.
    Enhancing websites with social experiences INDIA │ 22-24 November 2010 WE ♥ SOCIAL virtual techdays
  • 5.
    • Rest based API, unique ID per object, JSON response. Public data queries:
      • Object for VTD FB page: http://graph.facebook.com/49570201848
      • Object for Microsoft PDC FB page: http://graph.facebook.com/MicrosoftPDC
      • Meta data: http://graph.facebook.com/MicrosoftPDC?metadata=1
    • For querying private data, access token is required via FB authorization
      • PDC Statuses: http://graph.facebook.com/microsoftpdc/statuses?accesstoken=‘token ’
    • To use graph API with JavaScript SDK:
      • you need to register an FB app and get application ID (app Id)
      • Use the App Id in FB JavaScript API . jQuery suits perfect for AJAX & other cool stuff.
    Fun with Facebook’s Open Graph API INDIA │ 22-24 November 2010 WE ♥ SOCIAL virtual techdays
  • 6. virtual techdays DEMO: Facebook social plugins, Twitter widget INDIA │ 22-24 November 2010 WE ♥ SOCIAL
  • 7.
    • Most social n/w use oAuth protocol for authorization. [oAuth=‘no passwords please’]
    • FB JavaScript SDK simplifies login/signup without worrying about oAuth protocol.
    • To get FB “access token” programmatically, oAuth flow should be understood. Here are the steps of oAuth flow:
      • Redirect to https://graph.facebook.com/oauth/authorize? client_id=...& redirect_uri=http://www.example.com/oauth_redirect
      • User authorizes-> FB redirects to “redirect_uri” with the parameter “code”
      • Extract the “code” & redirect to: https://graph.facebook.com/oauth/access_token? client_id=...& redirect_uri=http://www.example.com/oauth_redirect& client_secret=...& code=...
      • From the above request, Facebook returns “access_token”. Use this to make authorized requests like : https://graph.facebook.com/me?access_token=...
    Querying private data… INDIA │ 22-24 November 2010 WE ♥ SOCIAL virtual techdays
  • 8. oAuth handshake Flow Diagram [Note: This is a generic oAuth flow diagram applicable to all social network APIs.] INDIA │ 22-24 November 2010 WE ♥ SOCIAL virtual techdays
  • 9. virtual techdays DEMO: Fetching Facebook friends list using C# INDIA │ 22-24 November 2010 WE ♥ SOCIAL
  • 10.
    • Facebook social plugins
      • http://developers.facebook.com/plugins
    • Twitter widgets
      • http://twitter.com/about/resources/widgets
    • Facebook SDKs used in demos
      • C# SDK: http://github.com/facebook/csharp-sdk
      • JavaScript SDK: http://developers.facebook.com/docs/reference/javascript/
    RESOURCES INDIA │ 22-24 November 2010 WE ♥ SOCIAL virtual techdays
  • 11. virtual techdays Twitter: @novogeek │ Blog: www.novogeek.com INDIA │ 22-24 November 2010 WE ♥ SOCIAL