3

我在 PhoneGap 项目中使用ShareKit2.0(不要与已失效的原始 ShareKit 混淆)。我已成功发送推文,但 Facebook 共享无法正常工作。

当窗口打开并选择“Facebook”按钮时,浏览器将打开以登录 facebook 移动网站。然后它会请求应用程序的授权。然后我点击“ok”,出现错误:

无法打开页面 Safari 无法打开该页面,因为该页面无效。

该页面的 URL 是: https ://m.facebook.com/dialog/permissions.request?refid=0

4

1 回答 1

1

You need to add a uri scheme for your app, in your apps Info.plist file, the file will be at the root of your application and called YOURAPPNAME-Info.plist you need to add the following

<array>
<dict>
    <key>CFBundleURLName</key>
    <string></string>
    <key>CFBundleURLSchemes</key>
    <array>
        <string>fbYOURFBAPPID</string>
        <string>app://flickr</string>
    </array>
</dict>
</array>

Replacing YOURFBAPPID with whatever your facebook APP id is.

于 2012-04-17T17:44:57.030 回答