ShareKit2.0 opens Facebook mobile but fails to redirect. Safari says page is invalid

Go To StackoverFlow.com

3

I'm using ShareKit2.0 (not to be confused with the original ShareKit which is defunct) in a PhoneGap project. I'm successfully sending tweets but Facebook sharing is not working.

When the window opens and I choose the "Facebook" button, the browser opens to log into the facebook mobile site. Then it asks for authorization for the app. Then I click "okay" and there is an error:

Cannot Open Page Safari cannot open the page because the page is invalid.

The URL of that page is: https://m.facebook.com/dialog/permissions.request?refid=0

2012-04-03 20:19
by emersonthis


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-17 17:44
by Rwky
Ads