Permalink
Browse files

Update README with some instructions

  • Loading branch information...
1 parent 0ebb232 commit 4d0c0e58bf930fdf8e35b6e17d58e71e270a580c Dave Johnson committed Jul 12, 2011
Showing with 47 additions and 50 deletions.
  1. +46 −6 README.md
  2. +1 −44 app/www/index.html
View
@@ -3,16 +3,56 @@ Facebook Connect PhoneGap Plugin
Offical plugin for Facebook Connect.
+Android (OS X)
+-----------
+
+Get the latest Android source from http://github.com/phonegap/phonegap-android and read the readme there about getting started with Android.
+
+From terminal run the following command:
+
+<pre>
+droidgap gen foobar
+</pre>
+
+In foobar/res/xml/plugins.xml add the following element as a child of the root plugins element:
+
+<pre>
+&lt;plugin name="com.facebook.phonegap.Connect" value="com.facebook.phonegap.Connect" /&gt;
+</pre>
+
+From the PhoneGap Facebook Connect Plugin folder copy the contents of the native/android/ folder into foobar/
+
+From the PhoneGap Facebook Connect Plugin folder copy the app/www folder into foobar/assets/ overwriting the index.html and icon.png files but keeping the phonegap...js file.
+
+From the PhoneGap Facebook Connect Plugin folder copy the www folder into foobar/assets/
+
+From terminal in the foobar folder (with an android device attached to your computer) run the following command:
+
+<pre>
+ant debug install
+</pre>
+
+
+iOS (OS X)
+-----------
+
+Get the latest iOS source from http://github.com/phonegap/phonegap-iphone and read the readme there about getting started with iOS.
+
+Create a new xcode project from the PhoneGap template that you created and installed (you did that if you read the readme on github I hope).
+
+From the PhoneGap Facebook Connect Plugin folder copy the contents of the native/ios folder into you app in xcode.
+
+Open the plugins.plist file in xcode and add an entry for com.facebook.phonegap.Connect ... SHAZ CAN YOU PLS ELABORATE?
+
+From the PhoneGap Facebook Connect Plugin folder copy the app/www folder into the www directory in xcode overwriting the index.html and icon.png files but keeping the phonegap...js file.
+
+From the PhoneGap Facebook Connect Plugin folder copy the www folder into the www directory in xcode.
-Testing
--------
+Run the application in xcode.
-To run the test suite you will need to have ios-sim installed. Then
-simply run:
- ./run-tests
-The tests can be found in `./test/www/facebook-connect-tests.js`.
+IGNORE THIS STUFF BELOW FOR NOW...
iOS Testing
-----------
View
@@ -3,9 +3,7 @@
<!-- phonegap -->
<script src="phonegap-0.9.6.js"></script>
<!-- phonegap facebook plugin -->
- <script src="facebook-connect-0.0.1.js"></script>
- <!-- weinre -->
- <script src="http://debug.phonegap.com/target/target-script-min.js#foobook"></script>
+ <script src="pg-plugin-facebook-connect.js"></script>
<!-- facebook js sdk -->
<script src="facebook.js"></script>
</head>
@@ -21,48 +19,7 @@
<div id="fb-root"></div>
<script>
-
- ///////////////////////////////////////////////////////////////////////////
- // We write results to the DOM because of handleOpenURL restrictions
-
- var lastTime = null;
- function writeTimestamp()
- {
- var now = new Date().getTime();
- if (lastTime == null) {
- lastTime = new Date(now);
- }
-
- var elapsed = now - lastTime;
- if (elapsed > 10000 || elapsed == 0) {
- write("<hr />");
- writeln(new Date(now).toString());
- if (elapsed != 0) {
- lastTime = new Date(now);
- }
- }
- }
-
- function writeLog(str)
- {
- writeTimestamp();
- writeln(str);
- }
-
- function write(str)
- {
- var el = document.getElementById("log");
- el.innerHTML = el.innerHTML + str;
- el.scrollTop = el.scrollHeight;
- }
-
- function writeln(str)
- {
- write(str + '<br />');
- }
- ///////////////////////////////////////////////////////////////////////////
-
FB.Event.subscribe('auth.login', function(response) {
writeLog('auth.login event');
});

0 comments on commit 4d0c0e5

Please sign in to comment.