Professional Documents
Culture Documents
Facebook Platform
Publishing to Open Graph Pages
7/28/2010
Facebook Platform: Publishing to Open Graph Pages
Introduction
This
article
describes
how
you
can
automatically
publish
to
all
users
who
have
liked
your
Open
Graph
protocol
Web
page
(http://developers.facebook.com/docs/opengraph).
• Included
all
the
Open
Graph
protocol
metadata
in
your
Web
page
(http://developers.facebook.com/docs/opengraph).
• Added
a
Like
button
to
your
Web
page
(http://developers.facebook.com/docs/reference/plugins/like).
Note:
You
must
specify
the
og:type
tag
in
order
to
publish.
However,
you
cannot
publish
to
Facebook
if
your
Web
page's
object
type
is
set
to
article.
• Verified that at least one user has liked your Web page.
You can automatically publish stories to users in one of two ways:
• Ensure
that
your
application
is
the
admin
of
the
Web
page.
• Get
an
access
token
for
your
application
• Publish
the
post.
Ensuring
your
application
is
the
admin
of
the
Web
page
In
order
to
publish,
your
application
must
be
designated
as
an
admin
for
the
Web
page.
2
Facebook Platform: Publishing to Open Graph Pages
<head>
<meta
http-‐equiv="Content-‐Type"
content="text/html;
charset=UTF-‐8"/>
...
<meta
property="fb:app_id"
content="101189511127"
/>
<meta
property="og:type"
content="blog"
/>
...
</head>
curl -F type=client_cred \
-F client_id=your_app_id \
-F client_secret=your_app_secret \
https://graph.facebook.com/oauth/access_token
curl -F 'access_token=...' \
-F 'message=Hello Likers' \
-F 'id=http://www.myopengraphpage.com/page1.html' \
https://graph.facebook.com/feed
3