2012-11-28 53 views
2

我想給FacebookSDK-3.1.1融入我的IPhone的應用程序(使用PhoneGap的2.1.0)。我不能回到我的應用程序,一旦登錄。的PhoneGap Facebook的登錄不回我的iPhone應用程序

我的目標是使用IPhone應用分享至Facebook。

下面我提供我的[項目] -Info.plist文件和Cordova.plist文件。

任何幫助將非常感激。

感謝

[項目] -Info.plist

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 
<plist version="1.0"> 
<dict> 
    <key>CFBundleDevelopmentRegion</key> 
    <string>English</string> 
    <key>CFBundleDisplayName</key> 
    <string>${PRODUCT_NAME}</string> 
    <key>CFBundleExecutable</key> 
    <string>${EXECUTABLE_NAME}</string> 
    <key>CFBundleIconFile</key> 
    <string>icon.png</string> 
    <key>CFBundleIcons</key> 
    <dict> 
     <key>CFBundlePrimaryIcon</key> 
     <dict> 
      <key>CFBundleIconFiles</key> 
      <array> 
       <string>icon.png</string> 
       <string>[email protected]</string> 
       <string>icon-72.png</string> 
       <string>[email protected]</string> 
      </array> 
      <key>UIPrerenderedIcon</key> 
      <false/> 
     </dict> 
    </dict> 
    <key>CFBundleIdentifier</key> 
    <string>com.Kwazzi.phonegap</string> 
    <key>CFBundleInfoDictionaryVersion</key> 
    <string>6.0</string> 
    <key>CFBundleName</key> 
    <string>${PRODUCT_NAME}</string> 
    <key>CFBundlePackageType</key> 
    <string>APPL</string> 
    <key>CFBundleShortVersionString</key> 
    <string>1.0</string> 
    <key>CFBundleSignature</key> 
    <string>????</string> 
    <key>CFBundleVersion</key> 
    <string>1.0</string> 
    <key>LSRequiresIPhoneOS</key> 
    <true/> 
    <key>NSMainNibFile</key> 
    <string></string> 
    <key>NSMainNibFile~ipad</key> 
    <string></string> 
    <key>UISupportedInterfaceOrientations</key> 
    <array> 
     <string>UIInterfaceOrientationPortrait</string> 
    </array> 
    <key>UISupportedInterfaceOrientations~ipad</key> 
    <array> 
     <string>UIInterfaceOrientationPortrait</string> 
     <string>UIInterfaceOrientationLandscapeLeft</string> 
     <string>UIInterfaceOrientationPortraitUpsideDown</string> 
     <string>UIInterfaceOrientationLandscapeRight</string> 
    </array> 
    <key>FacebookAppID</key> 
    <string>xxxxxxxxxxxxxxx</string> 
    <key>CFBundleURLTypes</key> 
    <array> 
     <dict> 
      <key>CFBundleURLSchemes</key> 
      <array> 
       <string>fbxxxxxxxxxxxxxxx</string> 
      </array> 
     </dict> 
    </array> 
</dict> 
</plist> 

Cordova.plist

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 
<plist version="1.0"> 
<dict> 
    <key>UIWebViewBounce</key> 
    <true/> 
    <key>TopActivityIndicator</key> 
    <string>gray</string> 
    <key>EnableLocation</key> 
    <false/> 
    <key>EnableViewportScale</key> 
    <false/> 
    <key>AutoHideSplashScreen</key> 
    <true/> 
    <key>ShowSplashScreenSpinner</key> 
    <true/> 
    <key>MediaPlaybackRequiresUserAction</key> 
    <false/> 
    <key>AllowInlineMediaPlayback</key> 
    <false/> 
    <key>OpenAllWhitelistURLsInWebView</key> 
    <false/> 
    <key>BackupWebStorage</key> 
    <true/> 
    <key>ExternalHosts</key> 
    <array> 
     <string>*</string> 
    </array> 
    <key>Plugins</key> 
    <dict> 
     <key>org.apache.cordova.facebook.Connect</key> 
     <string>FacebookConnectPlugin</string> 
     <key>Device</key> 
     <string>CDVDevice</string> 
     <key>Logger</key> 
     <string>CDVLogger</string> 
     <key>Compass</key> 
     <string>CDVLocation</string> 
     <key>Accelerometer</key> 
     <string>CDVAccelerometer</string> 
     <key>Camera</key> 
     <string>CDVCamera</string> 
     <key>NetworkStatus</key> 
     <string>CDVConnection</string> 
     <key>Contacts</key> 
     <string>CDVContacts</string> 
     <key>Debug Console</key> 
     <string>CDVDebugConsole</string> 
     <key>Echo</key> 
     <string>CDVEcho</string> 
     <key>File</key> 
     <string>CDVFile</string> 
     <key>FileTransfer</key> 
     <string>CDVFileTransfer</string> 
     <key>Geolocation</key> 
     <string>CDVLocation</string> 
     <key>Notification</key> 
     <string>CDVNotification</string> 
     <key>Media</key> 
     <string>CDVSound</string> 
     <key>Capture</key> 
     <string>CDVCapture</string> 
     <key>SplashScreen</key> 
     <string>CDVSplashScreen</string> 
     <key>Battery</key> 
     <string>CDVBattery</string> 
    </dict> 
</dict> 
</plist> 

回答

4

你不必在你的[PROJECTNAME]-Info.plist正確的配置。您錯過了「CFBundleURLName」。試試下面的代碼,它會幫助你。

<key>CFBundleURLTypes</key> 
    <array> 
     <dict> 
      <key>CFBundleURLName</key> 
      <string>com.facebook.phonegap.myscheme</string> 
      <key>CFBundleURLSchemes</key> 
      <array> 
       <string>fbxxxxxxxxxxxxxxx</string> 
      </array> 
     </dict> 
    </array> 
+0

爲感謝您的幫助:)。 –

相關問題