SlideShare a Scribd company logo
OPEN GRAPH API
AND HOW TO USE IT.
FACEBOOK DEVELOPERS MEETUP
AAYUSH SHRESTHA
FIND ME AT :
FB.COM/SHRESTHAAAYUSH
@AAYUSHSHRESTHA
AAYUSHONWEB@GMAIL.COM
UI/UX DEVELOPER - VIVEKA HEALTH
CO-FOUNDER - LISHN
INTRODUCTION
GRAPH API
▸ Primary way for apps to get data in and out of the 

Facebook Social Graph
▸ HTTP Based REST API
▸ You can :
▸ query data
▸ post status and stories
▸ upload pictures and videos and more …
▸ V2.8
INTRODUCTION
SOCIAL GRAPH
▸ Representation of the information on Facebook
▸ NODES
▸ EDGES
▸ FIELDS
INTRODUCTION
SOCIAL GRAPH - NODES
▸ Every “thing”, such as a user, a photo, a comment, a page is a
node.
▸ User
▸ Photo
▸ Album
▸ Event
▸ Group
▸ Page
▸ Comment
▸ Story
▸ Video
▸ Link
▸ Note
INTRODUCTION
SOCIAL GRAPH - EDGES
▸ The connection between these “things” are edges.
▸ Feed
▸ Tagged
▸ Posts
▸ Picture
▸ Friends
▸ Activities
▸ Interests
▸ Likes
▸ Photos
▸ Statuses
▸ The information about these “things” are fields.
▸ User has : name, age, birthday, etc.
▸ Page has : name, description, category, etc
INTRODUCTION
SOCIAL GRAPH - FIELDS
LETS USE GRAPH API!!
BUT, HOLD ON!
LET’S USE GRAPH API
BEFORE JUMPING IN
▸ Making Graph API calls require an Access Token
▸ Get your Access Token using Facebook Login or one of the
SDK’s
▸ Get familiar with the Graph API Explorer

http://developers.facebook.com/tools/explorer
LET’S USE GRAPH API
TRAVERSING THROUGH THE GRAPH
▸ Authentication : OAuth 2.0
▸ Selection (or Query)
▸ Basic Operations (Publishing, Updating and Deleting)
▸ Searching
▸ Introspection
LET’S USE GRAPH API
SELECTION - SELECTING NODES
▸ graph.facebook.com/{node_id}
▸ graph.facebook.com/{node_username}
▸ graph.facebook.com/{node_id}?fields=id,name
▸ TRY THESE
1./me?field=id,name
2./me?field=album.limit(10){name,likes,count},photos
3./album_id
4./page_id
LET’S USE GRAPH API
SELECTION - SELECTING CONNECTIONS
▸ graph.facebook.com/{node_id}?fields={connection_name}
▸ graph.facebook.com/{node_id}/{connection_name}
▸ graph.facebook.com/{node_id}/{connection_name}?
fields=id,name
▸ TRY THESE
1./me/friends
2./me/friends/friend_id
3./albums
4./photos?type=uploaded
LET’S USE GRAPH API
PUBLISHING
▸ Publishing is done in edges
▸ graph.facebook.com/{node_id}/{connection_name} - POST
Request
▸ TRY THESE
1./me/feed - Fields : message=Hello World!
2./me/feed - Fields : message=Hello World!, privacy = {value : ‘SELF’}
LET’S USE GRAPH API
UPDATING
▸ Make POST Requests, now on nodes
▸ graph.facebook.com/{node_id} - POST Request
▸ TRY THESE
1. /{node_id} - Fields : message=Hello World Again!!
LET’S USE GRAPH API
DELETING
▸ Make DELETE Request on the node
▸ graph.facebook.com/{node_id} - DELETE Request
▸ TRY THESE
1./{story_id}
LET’S USE GRAPH API
SEARCHING
▸ graph.facebook.com/search
▸ TRY THESE
1./search?q=john&type=user
2./search?q=facebook+meetup&type=event
3./search?q=coffee&type=place&center={lat},{lon}&distance=1000
LET’S USE GRAPH API
INTROSPECTION
▸ graph.facebook.com/{node_id}?metadata=1
▸ JSON comes with the metadata of the node
▸ What type of node is this?
▸ What are its fields and what do they represent?
▸ What connections does this node possess?
▸ TRY THESE
1./me?metadata=1
ADVANCED STUFF
OPEN GRAPH STORIES
OPEN GRAPH STORIES
OPEN GRAPH STORIES
▸ Rich, Structured Posts
▸ Strongly Typed API
▸ Implemented using
▸ Web SDK (JS)
▸ Android SDK
▸ iOS SDK
OPEN GRAPH STORIES
KEY CONCEPTS
▸ Actor : The person who posts the story
▸ App : The app that created the story
▸ Action : Activity the Actor performs (Verb)
▸ Object : The thing that the Actor interacts with
OPEN GRAPH STORIES
KEY CONCEPTS - ACTOR
OPEN GRAPH STORIES
KEY CONCEPTS - APP
OPEN GRAPH STORIES
KEY CONCEPTS - ACTION
OPEN GRAPH STORIES
KEY CONCEPTS - OBJECT
OPEN GRAPH STORIES
OPEN GRAPH STORIES ON WEB
▸ Create Facebook App ID
▸ Configure your web App
▸ You should have access to a public web server
OPEN GRAPH STORIES
OPEN GRAPH STORIES : ACTIONS
▸ Actions are verbs in stories
▸ Created using Graph API. e.g. to create a “like” action, we use
og.likes API Endpoint
FB.api({
'https://graph.facebook.com/me/og.likes',
'post',
{
object: obj,
privacy: {'value': 'SELF'}
},
})
OPEN GRAPH STORIES
OPEN GRAPH STORIES - ACTIONS
▸ Some Actions that are available to use
▸ og.likes
▸ og.follows
▸ save.saves
▸ book.reads
▸ book.rates
▸ games.achieves
▸ games.plays
▸ music.listens
▸ music.playlists
OPEN GRAPH STORIES
OPEN GRAPH STORIES : OBJECTS
▸ Created by adding meta tags on the page where your
content is.
<meta property="fb:app_id" content="148285558994270" />
<meta property="og:type" content="book" />
<meta property="og:url" content="https://aayushshrestha.github.io/AayushShrestha/
mynewbook.html" />
<meta property="og:title" content="I Like Cats" />
<meta property="og:image" content="http://www.rd.com/wp-content/uploads/sites/2/2016/04/01-cat-
wants-to-tell-you-laptop.jpg" />
<meta property="og:description" content="I Like Cats" />
OPEN GRAPH STORIES
OPEN GRAPH STORIES - OBJECTS
▸ Some Objects that are available to use
▸ article
▸ books.book
▸ books.author
▸ fitness.course
▸ game.achievement
▸ music.album
▸ music.song
▸ music.playlist
▸ place
▸ product
▸ restaurant.menu
THANK YOU!!
FIND ME AT :
FB.COM/SHRESTHAAAYUSH
@AAYUSHSHRESTHA
AAYUSHONWEB@GMAIL.COM

More Related Content

What's hot

Jetpack 2.0
Jetpack 2.0Jetpack 2.0
Jetpack 2.0
Suzette Franck
 
Social Media for Investigations Tools
Social Media for Investigations ToolsSocial Media for Investigations Tools
Social Media for Investigations Tools
Mandy Jenkins
 
Social media fundraising
Social media fundraisingSocial media fundraising
Social media fundraising
philipcellular
 
Conjuregram Review Ben Murray & Daniel Adetunji
Conjuregram Review Ben Murray & Daniel AdetunjiConjuregram Review Ben Murray & Daniel Adetunji
Conjuregram Review Ben Murray & Daniel Adetunji
Jvzooreview DotNet
 
Voxpupuli: a home for your puppet modules
Voxpupuli: a home for your puppet modulesVoxpupuli: a home for your puppet modules
Voxpupuli: a home for your puppet modules
Julien Pivotto
 
Vox pupuli
Vox pupuliVox pupuli
Vox pupuli
Julien Pivotto
 
Google Plus Pages for Brands and Businesses: What Now? What Next? - webinar
Google Plus Pages for Brands and Businesses: What Now? What Next? - webinarGoogle Plus Pages for Brands and Businesses: What Now? What Next? - webinar
Google Plus Pages for Brands and Businesses: What Now? What Next? - webinar
Cirrus ABS
 
How to connect social media with open standards
How to connect social media with open standardsHow to connect social media with open standards
How to connect social media with open standards
Glenn Jones
 
How I built the demo's
How I built the demo'sHow I built the demo's
How I built the demo's
Glenn Jones
 
Have fun with your photos using some of these photosharing sites
Have fun with your photos  using some of these  photosharing sites Have fun with your photos  using some of these  photosharing sites
Have fun with your photos using some of these photosharing sites
Fiona Beal
 
Re-using social media data
Re-using social media dataRe-using social media data
Re-using social media data
Glenn Jones
 
Mapping images the digital way
Mapping images the digital wayMapping images the digital way
Mapping images the digital way
Geoprimary
 
Google 2.0
Google 2.0Google 2.0
Google 2.0
Julia Gross
 
Twitter Basics for Business
Twitter Basics for BusinessTwitter Basics for Business
Twitter Basics for Business
Pam Ann Marketing
 
Blogs for Librarians - Karen du Toit
Blogs for Librarians - Karen du ToitBlogs for Librarians - Karen du Toit
Blogs for Librarians - Karen du Toit
Karen Du Toit
 
The page and the desktop
The page and the desktopThe page and the desktop
The page and the desktop
Glenn Jones
 
Microformats and SEO
Microformats and SEOMicroformats and SEO
Microformats and SEO
Glenn Jones
 
Social Media Reference Link (@JuliusDesign)
Social Media Reference Link (@JuliusDesign)Social Media Reference Link (@JuliusDesign)
Social Media Reference Link (@JuliusDesign)
Giuliano Ambrosio
 
Blog and search
Blog and searchBlog and search
Blog and search
Independant
 
Blending Social Media in WordPress
Blending Social Media in WordPressBlending Social Media in WordPress
Blending Social Media in WordPress
Yahya Ayob
 

What's hot (20)

Jetpack 2.0
Jetpack 2.0Jetpack 2.0
Jetpack 2.0
 
Social Media for Investigations Tools
Social Media for Investigations ToolsSocial Media for Investigations Tools
Social Media for Investigations Tools
 
Social media fundraising
Social media fundraisingSocial media fundraising
Social media fundraising
 
Conjuregram Review Ben Murray & Daniel Adetunji
Conjuregram Review Ben Murray & Daniel AdetunjiConjuregram Review Ben Murray & Daniel Adetunji
Conjuregram Review Ben Murray & Daniel Adetunji
 
Voxpupuli: a home for your puppet modules
Voxpupuli: a home for your puppet modulesVoxpupuli: a home for your puppet modules
Voxpupuli: a home for your puppet modules
 
Vox pupuli
Vox pupuliVox pupuli
Vox pupuli
 
Google Plus Pages for Brands and Businesses: What Now? What Next? - webinar
Google Plus Pages for Brands and Businesses: What Now? What Next? - webinarGoogle Plus Pages for Brands and Businesses: What Now? What Next? - webinar
Google Plus Pages for Brands and Businesses: What Now? What Next? - webinar
 
How to connect social media with open standards
How to connect social media with open standardsHow to connect social media with open standards
How to connect social media with open standards
 
How I built the demo's
How I built the demo'sHow I built the demo's
How I built the demo's
 
Have fun with your photos using some of these photosharing sites
Have fun with your photos  using some of these  photosharing sites Have fun with your photos  using some of these  photosharing sites
Have fun with your photos using some of these photosharing sites
 
Re-using social media data
Re-using social media dataRe-using social media data
Re-using social media data
 
Mapping images the digital way
Mapping images the digital wayMapping images the digital way
Mapping images the digital way
 
Google 2.0
Google 2.0Google 2.0
Google 2.0
 
Twitter Basics for Business
Twitter Basics for BusinessTwitter Basics for Business
Twitter Basics for Business
 
Blogs for Librarians - Karen du Toit
Blogs for Librarians - Karen du ToitBlogs for Librarians - Karen du Toit
Blogs for Librarians - Karen du Toit
 
The page and the desktop
The page and the desktopThe page and the desktop
The page and the desktop
 
Microformats and SEO
Microformats and SEOMicroformats and SEO
Microformats and SEO
 
Social Media Reference Link (@JuliusDesign)
Social Media Reference Link (@JuliusDesign)Social Media Reference Link (@JuliusDesign)
Social Media Reference Link (@JuliusDesign)
 
Blog and search
Blog and searchBlog and search
Blog and search
 
Blending Social Media in WordPress
Blending Social Media in WordPressBlending Social Media in WordPress
Blending Social Media in WordPress
 

Similar to Open Graph API And How To Use It : Facebook Developers Circle Meetup 2017

How to Setup App Indexation
How to Setup App IndexationHow to Setup App Indexation
How to Setup App Indexation
Justin Briggs
 
Facebook Apps: Ein Entwicklungsleitfaden - WMMRN
Facebook Apps: Ein Entwicklungsleitfaden - WMMRNFacebook Apps: Ein Entwicklungsleitfaden - WMMRN
Facebook Apps: Ein Entwicklungsleitfaden - WMMRN
Stephan Hochdörfer
 
How NOT to Suck at App Distribution - Quick Start Guide - Appsocially's Growt...
How NOT to Suck at App Distribution - Quick Start Guide - Appsocially's Growt...How NOT to Suck at App Distribution - Quick Start Guide - Appsocially's Growt...
How NOT to Suck at App Distribution - Quick Start Guide - Appsocially's Growt...
Yusuke Takahashi, PhD
 
Bear Douglas - Open Graph Montreal
Bear Douglas - Open Graph MontrealBear Douglas - Open Graph Montreal
Bear Douglas - Open Graph Montreal
pherrera82
 
Programming Social Applications
Programming Social ApplicationsProgramming Social Applications
Programming Social Applications
Jonathan LeBlanc
 
Sunnyside Up: Facebook Mobile, Follow, and Like Updates and Google +1 Updates
Sunnyside Up: Facebook Mobile, Follow, and Like Updates and Google +1 UpdatesSunnyside Up: Facebook Mobile, Follow, and Like Updates and Google +1 Updates
Sunnyside Up: Facebook Mobile, Follow, and Like Updates and Google +1 Updates
Profero New York
 
Introduction to Web APIs and the Google+ API - BarCamp Phnom Penh 2011
Introduction to Web APIs and the Google+ API - BarCamp Phnom Penh 2011Introduction to Web APIs and the Google+ API - BarCamp Phnom Penh 2011
Introduction to Web APIs and the Google+ API - BarCamp Phnom Penh 2011
traactivity
 
Google+ platform (9-15-2011)
Google+ platform (9-15-2011)Google+ platform (9-15-2011)
Google+ platform (9-15-2011)
brada
 
Shiny Agency's Facebook Development Guidelines
Shiny Agency's Facebook Development GuidelinesShiny Agency's Facebook Development Guidelines
Shiny Agency's Facebook Development Guidelines
Roy Pereira
 
Facebook Open Graph Tech Requirements
Facebook Open Graph Tech RequirementsFacebook Open Graph Tech Requirements
Facebook Open Graph Tech Requirements
Affinitive
 
Django User Management & Social Authentication
Django User Management & Social AuthenticationDjango User Management & Social Authentication
Django User Management & Social Authentication
Spin Lai
 
Optimizing WordPress sites for SEO and social media by Miriam Schwab
Optimizing WordPress sites for SEO and social media by Miriam SchwabOptimizing WordPress sites for SEO and social media by Miriam Schwab
Optimizing WordPress sites for SEO and social media by Miriam Schwab
Miriam Schwab
 
Introduction to OpenSocial
Introduction to OpenSocialIntroduction to OpenSocial
Introduction to OpenSocial
Christian Scholz
 
EIA2016Turin - PJ Leimgruber. Landing Page & Collecting Leads
EIA2016Turin - PJ Leimgruber. Landing Page & Collecting LeadsEIA2016Turin - PJ Leimgruber. Landing Page & Collecting Leads
EIA2016Turin - PJ Leimgruber. Landing Page & Collecting Leads
European Innovation Academy
 
The Flash Facebook Cookbook - FlashMidlands
The Flash Facebook Cookbook - FlashMidlandsThe Flash Facebook Cookbook - FlashMidlands
The Flash Facebook Cookbook - FlashMidlands
James Ford
 
Hi5 Open Social
Hi5   Open SocialHi5   Open Social
Hi5 Open Social
Julia Foxworthy
 
Meteor.js for DOers
Meteor.js for DOersMeteor.js for DOers
Meteor.js for DOers
ShavonnahTiera
 
What's New on the Facebook Platform, July 2011
What's New on the Facebook Platform, July 2011What's New on the Facebook Platform, July 2011
What's New on the Facebook Platform, July 2011
Iskandar Najmuddin
 
Simple Social Networking with Ruby on Rails
Simple Social Networking with Ruby on RailsSimple Social Networking with Ruby on Rails
Simple Social Networking with Ruby on Rails
jhenry
 
Iskandar Najmuddin
Iskandar NajmuddinIskandar Najmuddin
Iskandar Najmuddin
iPlatform
 

Similar to Open Graph API And How To Use It : Facebook Developers Circle Meetup 2017 (20)

How to Setup App Indexation
How to Setup App IndexationHow to Setup App Indexation
How to Setup App Indexation
 
Facebook Apps: Ein Entwicklungsleitfaden - WMMRN
Facebook Apps: Ein Entwicklungsleitfaden - WMMRNFacebook Apps: Ein Entwicklungsleitfaden - WMMRN
Facebook Apps: Ein Entwicklungsleitfaden - WMMRN
 
How NOT to Suck at App Distribution - Quick Start Guide - Appsocially's Growt...
How NOT to Suck at App Distribution - Quick Start Guide - Appsocially's Growt...How NOT to Suck at App Distribution - Quick Start Guide - Appsocially's Growt...
How NOT to Suck at App Distribution - Quick Start Guide - Appsocially's Growt...
 
Bear Douglas - Open Graph Montreal
Bear Douglas - Open Graph MontrealBear Douglas - Open Graph Montreal
Bear Douglas - Open Graph Montreal
 
Programming Social Applications
Programming Social ApplicationsProgramming Social Applications
Programming Social Applications
 
Sunnyside Up: Facebook Mobile, Follow, and Like Updates and Google +1 Updates
Sunnyside Up: Facebook Mobile, Follow, and Like Updates and Google +1 UpdatesSunnyside Up: Facebook Mobile, Follow, and Like Updates and Google +1 Updates
Sunnyside Up: Facebook Mobile, Follow, and Like Updates and Google +1 Updates
 
Introduction to Web APIs and the Google+ API - BarCamp Phnom Penh 2011
Introduction to Web APIs and the Google+ API - BarCamp Phnom Penh 2011Introduction to Web APIs and the Google+ API - BarCamp Phnom Penh 2011
Introduction to Web APIs and the Google+ API - BarCamp Phnom Penh 2011
 
Google+ platform (9-15-2011)
Google+ platform (9-15-2011)Google+ platform (9-15-2011)
Google+ platform (9-15-2011)
 
Shiny Agency's Facebook Development Guidelines
Shiny Agency's Facebook Development GuidelinesShiny Agency's Facebook Development Guidelines
Shiny Agency's Facebook Development Guidelines
 
Facebook Open Graph Tech Requirements
Facebook Open Graph Tech RequirementsFacebook Open Graph Tech Requirements
Facebook Open Graph Tech Requirements
 
Django User Management & Social Authentication
Django User Management & Social AuthenticationDjango User Management & Social Authentication
Django User Management & Social Authentication
 
Optimizing WordPress sites for SEO and social media by Miriam Schwab
Optimizing WordPress sites for SEO and social media by Miriam SchwabOptimizing WordPress sites for SEO and social media by Miriam Schwab
Optimizing WordPress sites for SEO and social media by Miriam Schwab
 
Introduction to OpenSocial
Introduction to OpenSocialIntroduction to OpenSocial
Introduction to OpenSocial
 
EIA2016Turin - PJ Leimgruber. Landing Page & Collecting Leads
EIA2016Turin - PJ Leimgruber. Landing Page & Collecting LeadsEIA2016Turin - PJ Leimgruber. Landing Page & Collecting Leads
EIA2016Turin - PJ Leimgruber. Landing Page & Collecting Leads
 
The Flash Facebook Cookbook - FlashMidlands
The Flash Facebook Cookbook - FlashMidlandsThe Flash Facebook Cookbook - FlashMidlands
The Flash Facebook Cookbook - FlashMidlands
 
Hi5 Open Social
Hi5   Open SocialHi5   Open Social
Hi5 Open Social
 
Meteor.js for DOers
Meteor.js for DOersMeteor.js for DOers
Meteor.js for DOers
 
What's New on the Facebook Platform, July 2011
What's New on the Facebook Platform, July 2011What's New on the Facebook Platform, July 2011
What's New on the Facebook Platform, July 2011
 
Simple Social Networking with Ruby on Rails
Simple Social Networking with Ruby on RailsSimple Social Networking with Ruby on Rails
Simple Social Networking with Ruby on Rails
 
Iskandar Najmuddin
Iskandar NajmuddinIskandar Najmuddin
Iskandar Najmuddin
 

More from Aayush Shrestha

Design and UX. An Introduction
Design and UX. An IntroductionDesign and UX. An Introduction
Design and UX. An Introduction
Aayush Shrestha
 
Workshop on Hybrid App Development with Ionic Framework
Workshop on Hybrid App Development with Ionic FrameworkWorkshop on Hybrid App Development with Ionic Framework
Workshop on Hybrid App Development with Ionic Framework
Aayush Shrestha
 
Power of Elastic Search - nLocate
Power of Elastic Search - nLocatePower of Elastic Search - nLocate
Power of Elastic Search - nLocate
Aayush Shrestha
 
JavaScript : What is it really? AND Some new features in ES6
JavaScript : What is it really? AND Some new features in ES6JavaScript : What is it really? AND Some new features in ES6
JavaScript : What is it really? AND Some new features in ES6
Aayush Shrestha
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular js
Aayush Shrestha
 
A Half Day Workshop on Building Accessible Websites For People With Disabilities
A Half Day Workshop on Building Accessible Websites For People With DisabilitiesA Half Day Workshop on Building Accessible Websites For People With Disabilities
A Half Day Workshop on Building Accessible Websites For People With Disabilities
Aayush Shrestha
 
XBRL Implementation for Financial Reporting | NCASA
XBRL Implementation for Financial Reporting | NCASAXBRL Implementation for Financial Reporting | NCASA
XBRL Implementation for Financial Reporting | NCASA
Aayush Shrestha
 
XBRL Implementation for Financial Reporting
XBRL Implementation for Financial ReportingXBRL Implementation for Financial Reporting
XBRL Implementation for Financial Reporting
Aayush Shrestha
 

More from Aayush Shrestha (8)

Design and UX. An Introduction
Design and UX. An IntroductionDesign and UX. An Introduction
Design and UX. An Introduction
 
Workshop on Hybrid App Development with Ionic Framework
Workshop on Hybrid App Development with Ionic FrameworkWorkshop on Hybrid App Development with Ionic Framework
Workshop on Hybrid App Development with Ionic Framework
 
Power of Elastic Search - nLocate
Power of Elastic Search - nLocatePower of Elastic Search - nLocate
Power of Elastic Search - nLocate
 
JavaScript : What is it really? AND Some new features in ES6
JavaScript : What is it really? AND Some new features in ES6JavaScript : What is it really? AND Some new features in ES6
JavaScript : What is it really? AND Some new features in ES6
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular js
 
A Half Day Workshop on Building Accessible Websites For People With Disabilities
A Half Day Workshop on Building Accessible Websites For People With DisabilitiesA Half Day Workshop on Building Accessible Websites For People With Disabilities
A Half Day Workshop on Building Accessible Websites For People With Disabilities
 
XBRL Implementation for Financial Reporting | NCASA
XBRL Implementation for Financial Reporting | NCASAXBRL Implementation for Financial Reporting | NCASA
XBRL Implementation for Financial Reporting | NCASA
 
XBRL Implementation for Financial Reporting
XBRL Implementation for Financial ReportingXBRL Implementation for Financial Reporting
XBRL Implementation for Financial Reporting
 

Recently uploaded

Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
saastr
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
Ajin Abraham
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Neo4j
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 

Recently uploaded (20)

Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 

Open Graph API And How To Use It : Facebook Developers Circle Meetup 2017

  • 1. OPEN GRAPH API AND HOW TO USE IT. FACEBOOK DEVELOPERS MEETUP
  • 2. AAYUSH SHRESTHA FIND ME AT : FB.COM/SHRESTHAAAYUSH @AAYUSHSHRESTHA AAYUSHONWEB@GMAIL.COM UI/UX DEVELOPER - VIVEKA HEALTH CO-FOUNDER - LISHN
  • 3. INTRODUCTION GRAPH API ▸ Primary way for apps to get data in and out of the 
 Facebook Social Graph ▸ HTTP Based REST API ▸ You can : ▸ query data ▸ post status and stories ▸ upload pictures and videos and more … ▸ V2.8
  • 4. INTRODUCTION SOCIAL GRAPH ▸ Representation of the information on Facebook ▸ NODES ▸ EDGES ▸ FIELDS
  • 5. INTRODUCTION SOCIAL GRAPH - NODES ▸ Every “thing”, such as a user, a photo, a comment, a page is a node. ▸ User ▸ Photo ▸ Album ▸ Event ▸ Group ▸ Page ▸ Comment ▸ Story ▸ Video ▸ Link ▸ Note
  • 6. INTRODUCTION SOCIAL GRAPH - EDGES ▸ The connection between these “things” are edges. ▸ Feed ▸ Tagged ▸ Posts ▸ Picture ▸ Friends ▸ Activities ▸ Interests ▸ Likes ▸ Photos ▸ Statuses
  • 7. ▸ The information about these “things” are fields. ▸ User has : name, age, birthday, etc. ▸ Page has : name, description, category, etc INTRODUCTION SOCIAL GRAPH - FIELDS
  • 10. LET’S USE GRAPH API BEFORE JUMPING IN ▸ Making Graph API calls require an Access Token ▸ Get your Access Token using Facebook Login or one of the SDK’s ▸ Get familiar with the Graph API Explorer
 http://developers.facebook.com/tools/explorer
  • 11. LET’S USE GRAPH API TRAVERSING THROUGH THE GRAPH ▸ Authentication : OAuth 2.0 ▸ Selection (or Query) ▸ Basic Operations (Publishing, Updating and Deleting) ▸ Searching ▸ Introspection
  • 12. LET’S USE GRAPH API SELECTION - SELECTING NODES ▸ graph.facebook.com/{node_id} ▸ graph.facebook.com/{node_username} ▸ graph.facebook.com/{node_id}?fields=id,name ▸ TRY THESE 1./me?field=id,name 2./me?field=album.limit(10){name,likes,count},photos 3./album_id 4./page_id
  • 13. LET’S USE GRAPH API SELECTION - SELECTING CONNECTIONS ▸ graph.facebook.com/{node_id}?fields={connection_name} ▸ graph.facebook.com/{node_id}/{connection_name} ▸ graph.facebook.com/{node_id}/{connection_name}? fields=id,name ▸ TRY THESE 1./me/friends 2./me/friends/friend_id 3./albums 4./photos?type=uploaded
  • 14. LET’S USE GRAPH API PUBLISHING ▸ Publishing is done in edges ▸ graph.facebook.com/{node_id}/{connection_name} - POST Request ▸ TRY THESE 1./me/feed - Fields : message=Hello World! 2./me/feed - Fields : message=Hello World!, privacy = {value : ‘SELF’}
  • 15. LET’S USE GRAPH API UPDATING ▸ Make POST Requests, now on nodes ▸ graph.facebook.com/{node_id} - POST Request ▸ TRY THESE 1. /{node_id} - Fields : message=Hello World Again!!
  • 16. LET’S USE GRAPH API DELETING ▸ Make DELETE Request on the node ▸ graph.facebook.com/{node_id} - DELETE Request ▸ TRY THESE 1./{story_id}
  • 17. LET’S USE GRAPH API SEARCHING ▸ graph.facebook.com/search ▸ TRY THESE 1./search?q=john&type=user 2./search?q=facebook+meetup&type=event 3./search?q=coffee&type=place&center={lat},{lon}&distance=1000
  • 18. LET’S USE GRAPH API INTROSPECTION ▸ graph.facebook.com/{node_id}?metadata=1 ▸ JSON comes with the metadata of the node ▸ What type of node is this? ▸ What are its fields and what do they represent? ▸ What connections does this node possess? ▸ TRY THESE 1./me?metadata=1
  • 20. OPEN GRAPH STORIES OPEN GRAPH STORIES ▸ Rich, Structured Posts ▸ Strongly Typed API ▸ Implemented using ▸ Web SDK (JS) ▸ Android SDK ▸ iOS SDK
  • 21. OPEN GRAPH STORIES KEY CONCEPTS ▸ Actor : The person who posts the story ▸ App : The app that created the story ▸ Action : Activity the Actor performs (Verb) ▸ Object : The thing that the Actor interacts with
  • 22. OPEN GRAPH STORIES KEY CONCEPTS - ACTOR
  • 23. OPEN GRAPH STORIES KEY CONCEPTS - APP
  • 24. OPEN GRAPH STORIES KEY CONCEPTS - ACTION
  • 25. OPEN GRAPH STORIES KEY CONCEPTS - OBJECT
  • 26. OPEN GRAPH STORIES OPEN GRAPH STORIES ON WEB ▸ Create Facebook App ID ▸ Configure your web App ▸ You should have access to a public web server
  • 27. OPEN GRAPH STORIES OPEN GRAPH STORIES : ACTIONS ▸ Actions are verbs in stories ▸ Created using Graph API. e.g. to create a “like” action, we use og.likes API Endpoint FB.api({ 'https://graph.facebook.com/me/og.likes', 'post', { object: obj, privacy: {'value': 'SELF'} }, })
  • 28. OPEN GRAPH STORIES OPEN GRAPH STORIES - ACTIONS ▸ Some Actions that are available to use ▸ og.likes ▸ og.follows ▸ save.saves ▸ book.reads ▸ book.rates ▸ games.achieves ▸ games.plays ▸ music.listens ▸ music.playlists
  • 29. OPEN GRAPH STORIES OPEN GRAPH STORIES : OBJECTS ▸ Created by adding meta tags on the page where your content is. <meta property="fb:app_id" content="148285558994270" /> <meta property="og:type" content="book" /> <meta property="og:url" content="https://aayushshrestha.github.io/AayushShrestha/ mynewbook.html" /> <meta property="og:title" content="I Like Cats" /> <meta property="og:image" content="http://www.rd.com/wp-content/uploads/sites/2/2016/04/01-cat- wants-to-tell-you-laptop.jpg" /> <meta property="og:description" content="I Like Cats" />
  • 30. OPEN GRAPH STORIES OPEN GRAPH STORIES - OBJECTS ▸ Some Objects that are available to use ▸ article ▸ books.book ▸ books.author ▸ fitness.course ▸ game.achievement ▸ music.album ▸ music.song ▸ music.playlist ▸ place ▸ product ▸ restaurant.menu
  • 31. THANK YOU!! FIND ME AT : FB.COM/SHRESTHAAAYUSH @AAYUSHSHRESTHA AAYUSHONWEB@GMAIL.COM