Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Updated README to handle the JSON issues #11

Merged
merged 3 commits into from

1 participant

Commits on Aug 17, 2011
  1. @shazron
  2. @shazron

    Typo fix

    shazron authored
  3. @shazron

    More typo fixes

    shazron authored
This page is out of date. Refresh to see the latest.
Showing with 22 additions and 10 deletions.
  1. +22 −10 README.md
View
32 README.md
@@ -52,22 +52,34 @@ ant debug install
iOS (Mac OS X)
--------------
-1. Get the latest iOS source from http://github.com/phonegap/phonegap-iphone and read the README there about getting started with iOS.
-2. 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).
-3. From the 'PhoneGap Facebook Connect Plugin' folder copy the contents of the native/ios folder into your app in Xcode (usually in the Plugins folder group).
-4. Find the PhoneGap.plist file in the project navigator, expand the "Plugins" sub-tree, and add a new entry. For the key, add "com.phonegap.facebook.Connect", and its value will be "FacebookConnectPlugin"
-5. From the' PhoneGap Facebook Connect Plugin' folder copy contents of the app/www folder into the www directory in Xcode overwriting the index.html and icon.png files but keeping the phonegap.*.js file
-6. for Xcode 4, you will need to build it once, and heed the warning - this is an Xcode 4 template limitation. The warning instructions will tell you to drag copy the www folder into the project in Xcode.
-7. Run the application in Xcode.
-8. Add the URL Scheme for your app below
+1. Make sure you've registered your Facebook app with Facebook, and have an **APP__ID** and **APP__SECRET**
+2. Get the latest iOS source from [http://github.com/phonegap/phonegap-iphone](http://github.com/phonegap/phonegap-iphone) and read the README there about getting started with iOS.
+3. 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).
+4. From the **PhoneGap Facebook Connect Plugin** folder copy the contents of the **native/ios** folder into your app in Xcode (usually in the **Plugins** folder group). Make sure it is added as a "group" (yellow folder)
+5. Modify the **APP__SECRET** value in **FacebookConnectPlugin.m** with your Facebook app's **APP__SECRET**
+6. Find the PhoneGap.plist file in the project navigator, expand the "Plugins" sub-tree, and add a new entry. For the key, add **com.phonegap.facebook.Connect**, and its value will be **FacebookConnectPlugin**
+7. From the **PhoneGap Facebook Connect Plugin** folder copy the contents of the **app/www** folder into the **www** directory in Xcode overwriting the index.html and icon.png files but keeping the phonegap.*.js file
+8. From the **PhoneGap Facebook Connect Plugin** folder copy the contents of the **lib** folder into the **www** directory in Xcode
+9. for Xcode 4, you will need to build it once, and heed the warning - this is an Xcode 4 template limitation. The warning instructions will tell you to drag copy the **www** folder into the project in Xcode (add as a **folder reference** which is a blue folder).
+10. Under the group **Supporting Files**, find your **[PROJECTNAME]-Info.plist**, right-click on the file and select **Open As -> Source Code**, add the **URL Scheme** from the section below (you will need your Facebook **APP_ID**)
+11. Download the **Facebook iOS SDK** from [https://github.com/facebook/facebook-ios-sdk](https://github.com/facebook/facebook-ios-sdk) and put it into your project folder
+12. Drag the **facebook-ios-sdk.xcodeproj** file into your project, this will create it as a sub-project
+13. Click on your project's icon (the root element) in Project Navigator, select your **Target**, and the **Build Phases** tab.
+14. From the **Build Phases** tab, expand **Target Dependencies**, then click on the **+** button
+15. Add the build product from the **facebook-ios-sdk sub-project**
+16. From the **Build Settings** tab, search for **Header Search Paths**
+17. Add the value **/Users/Shared/PhoneGap/Frameworks/PhoneGap.framework/Headers**
+18. From the **facebook-ios-sdk.xcodeproj** sub-project, drag out the **FBConnect** folder into your project's **Plugins** folder, and add it as a group (yellow folder).
+19. From your **Plugins/FBConnect** folder, remove the **JSON** folder (remove reference only)
+20. Run the application in Xcode.
iOS URL Scheme
-----------
Make sure you add the scheme to your [PROJECTNAME]-Info.plist (located as one of the files in your Xcode project), substitute [APP_ID] and [SCHEME_ID] below to the appropriate values. This is to handle the re-direct from Mobile Safari or the Facebook app, after permission authorization.
-* [SCHEME_ID] is usually a unique identifier for the scheme, in reverse domain name notation (i.e com.facebook.phonegap.myscheme)
-* [APP_ID] is the Facebook app id given by Facebook
+* [**SCHEME_ID**] is usually a unique identifier for the scheme, in reverse domain name notation (i.e com.facebook.phonegap.myscheme)
+* [**APP_ID**] is the Facebook app id given by Facebook
<pre>
&lt;key&gt;CFBundleURLTypes&lt;/key&gt;
Something went wrong with that request. Please try again.