Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

r2625@opsdev009 (orig r132467): pbratach | 2008-11-18 16:19:05 -0800

 Create Facebook Connect demo directory in our public repository.
 
 Summary: Create new directory, add in updated files.
 
 Reviewed By: wzhu
 
 Test Plan: checked my sandbox.
 
 Other Notes:
 
 - begin *PUBLIC* platform impact section -
 Bugzilla: #
 - end platform impact -
  • Loading branch information...
commit 1b103ede5dfac29d517df78b287eb08431423bf9 1 parent 55f0f47
(no author) authored
38 samples/connect-demos/demo1.htm
View
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
+<head>
+ <title>Facebook Connect Demo 1</title>
+</head>
+<body>
+ <h1>
+ Facebook Connect Demo 1</h1>
+ <p>Login flow example, with simple API call example</p>
+ <p>Login Button:</p>
+ <fb:login-button>
+ </fb:login-button>
+
+ <a href="index.htm">back to index.htm</a>
+
+ <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php"
+ type="text/javascript"></script>
+
+ <script type="text/javascript">
+ FB_RequireFeatures(["XFBML"], function()
+ {
+ FB.Facebook.init("YOUR_API_KEY_HERE", "xd_receiver.htm");
+ FB.Facebook.get_sessionState().waitUntilReady(function()
+ {
+ window.alert("Session is ready");
+ //If you want to make Facebook API calls from JavaScript do something like
+ FB.Facebook.apiClient.friends_get(null, function(result, ex) {
+ //Do something with result
+ window.alert("Friends list: " + result);
+ });
+
+ });
+ });
+ </script>
+
+</body>
+</html>
80 samples/connect-demos/demo2.htm
View
@@ -0,0 +1,80 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
+<head>
+ <title>Facebook Connect Demo 2</title>
+</head>
+<body>
+ <h1>
+ Facebook Connect Demo 2</h1>
+ <p>
+ Login flow and basic XFBML examples
+ </p>
+ <p>
+ Login Button</p>
+ <fb:login-button>
+ </fb:login-button>
+ <h1>
+ Client-side XFBML, rendered directly with JS</h1>
+ <p>
+ Demo using different FBML tags</p>
+ <p>
+ <fb:name uid="USER_ID_HERE" capitalize="true" shownetwork="true">
+ </fb:name>
+ <---- fb:name <br/>
+ <fb:pronoun uid="USER_ID_HERE" possessive="true" reflexive="true">
+ </fb:pronoun>
+ <---- fb:pronoun
+ </p>
+ <div style="">
+ <div>
+ fb:profile-pic Variations</div>
+ <fb:profile-pic uid="USER_ID_HERE">
+ </fb:profile-pic>
+ <fb:profile-pic uid="USER_ID_HERE" size="thumb">
+ </fb:profile-pic>
+ <fb:profile-pic uid="USER_ID_HERE" size="small">
+ </fb:profile-pic>
+ <fb:profile-pic uid="USER_ID_HERE" size="pic_square" shownetwork="true">
+ </fb:profile-pic>
+ </div>
+ <div>
+ <p>
+ Groups
+ </p>
+ <fb:grouplink gid="7406420086">
+ </fb:grouplink>
+ </div>
+ <p>
+ Events</p>
+ <fb:eventlink eid="14400738508">
+ </fb:eventlink>
+ <div>
+ <p>
+ User links/status</p>
+ <fb:userlink uid="USER_ID_HERE">
+ </fb:userlink><fb:userstatus uid="USER_ID_HERE"></fb:userstatus>
+ <div>
+ <fb:profile-pic uid="USER_ID_HERE">
+ </fb:profile-pic><fb:userstatus uid="USER_ID_HERE"></fb:userstatus>
+ </div>
+ <span>and </span>
+ <fb:userlink uid="12313213123" ifcantsee="Someone I can't see">
+ </fb:userlink>
+ <br/>
+ </div>
+
+ <a href="index.htm">back to index.htm</a>
+
+ <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php"
+ type="text/javascript"></script>
+
+ <script type="text/javascript">
+ FB_RequireFeatures(["XFBML"], function()
+ {
+ FB.Facebook.init("YOUR_API_KEY_HERE", "xd_receiver.htm");
+ });
+ </script>
+
+</body>
+</html>
48 samples/connect-demos/demo3.htm
View
@@ -0,0 +1,48 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
+<head>
+ <title>Facebook Connect Demo 3</title>
+</head>
+<body>
+ <h1>Facebook Connect Demo 3</h1>
+ <p>
+ Login flow and serverside XFBML (Request form)
+ </p>
+ <p>Login Button:</p>
+ <fb:login-button>
+ </fb:login-button>
+ <h2>XFBML rendered as an iframe from facebook.com</h2>
+ <!-- Server FBML tags are necessary for Facebook elements which must be hosted on Facebook. The request form is one of these, as demonstrated below. See the documentation for a list of such elements. -->
+ <fb:serverfbml style="width: 755px;">
+ <script type="text/fbml">
+ <fb:fbml>
+ <fb:request-form
+ action="<url for post invite action, see wiki.developers.facebook.com for fb:request-form details>"
+ method="POST"
+ invite="true"
+ type="XFBML"
+ content="This is a test invitation from XFBML test app
+ <fb:req-choice url='see wiki page for fb:req-choice for details'
+ label='Ignore the Connect test app!' />">
+ <fb:multi-friend-selector
+ showborder="false"
+ actiontext="Invite your friends to use Connect.">
+ </fb:request-form>
+ </fb:fbml>
+ </script>
+ </fb:serverfbml>
+ <a href="index.htm">back to index.htm</a>
+
+ <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php"
+ type="text/javascript"></script>
+
+ <script type="text/javascript">
+ FB_RequireFeatures(["XFBML"], function()
+ {
+ FB.Facebook.init("YOUR_API_KEY_HERE", "xd_receiver.htm");
+ });
+ </script>
+
+</body>
+</html>
17 samples/connect-demos/index.htm
View
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
+<head>
+ <title>Facebook Connect Demo</title>
+</head>
+<body>
+ <p>Demo of Facebook Connect Features</p>
+
+ <ul>
+ <li><a href="demo1.htm">Login flow example, with simple API call example</a></li>
+ <li><a href="demo2.htm">Login flow and basic XFBML examples</a></li>
+ <li><a href="demo3.htm">Login flow and serverside XFBML (Request form)</a></li>
+ </ul>
+
+</body>
+</html>
10 samples/connect-demos/xd_receiver.htm
View
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" >
+<head>
+ <title>cross domain receiver page</title>
+</head>
+<body>
+ <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/XdCommReceiver.debug.js" type="text/javascript"></script>
+</body>
+</html>
Please sign in to comment.
Something went wrong with that request. Please try again.