Brief notes on Facebook API

cakeexoticInternet και Εφαρμογές Web

13 Δεκ 2013 (πριν από 3 χρόνια και 7 μήνες)

63 εμφανίσεις

API Presentation Summary



Facebook
is

currently

in the process of d
eprecating their old API system

“REST AP”

to
the new “Graph API”.
Graph
API is the core of Facebook. It saves people, events, pictures, etc
and the relationships between
them

as
JSON objects
.

Each Object has an ID, and you can l
ook up its public information by the
following

URL:


https://graph.facebook.com/

+ ‘
ID



Eg,
https://graph.faceboo
k.com/zuck

returns:


{

"id": "4",



"name": "Mark Zuckerberg",



...



"locale": "en_US"


}


To

search for public informati
on on Facebook

you need to construct the following URL

without any

key or any

kind of authentication.


https://graph.facebook.com/search?q=

+ ‘
query
’ +
&
type
=

+ ‘
type



T
ype
s

of objects can be:

post, user, page, event, group, place, checkin, etc.


Eg,

https://graph.facebook.com/search?q=puppies&type=page

returns:

{ "data": [


{

"name": "Puppies!",




"category": "Public figure",




"id": "53371356478" },




{

"name": "Puppies",

.


],

"paging": { "next":
"https://graph.facebook.com/search?q=puppies&type=page&limit=25&offset=25" } }


To do

private searches you
have to request a

App ID

to Faceboo
k, to be able to get one
you either have to give Facebook your phone number or your Credit card info.


Using

this

that app id

or
access_token

you can request the user to login into his Facebook
account
and
give the

app


access
to
their

private information.



To make requests for the

private information

build the URL to get the friends:


https://
graph.facebook.com/me/
friends
?

+


access_token


+


callback=displ
ayConten



You can also ask for other information such as: News feed (
home
)
, likes, mo
vies
, music,
photos, albums, events, groups, etc.

You can find
father

do
cumentation at:

http://developers.facebook.com/

http://developers.facebook.com/docs/coreconcepts/