blackgun
blackgun

Reputation: 411

how to set facebook app id in iOS

I thought an app need to submit the App ID to facebook server to pass OAuth , getting user's permission , then get the active session to read/post information.

I am looking for something like:

Facebook fb = new Facebook("YOUR_APP_ID");

I checked the "Facebook iOS SDK" tutorials and project "HelloFacebookSample" , but did not find any code to set my App ID. How to set my App ID and App Secret? How to make "HelloFacebookSample" to use my App , instead of using the official sample app? I am using Xcode. Thanks.

Upvotes: 0

Views: 13682

Answers (1)

user7422777
user7422777

Reputation:

you should set it in the Info.plist just before the last </dict> element

<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>fbxxxxxxxxxxxxxxx</string>
        </array>
    </dict>
</array>
<key>CFBundleVersion</key>
<string>2.8</string>
<key>FacebookAppID</key>
<string>xxxxxxxxxxxxxxx</string>
<key>FacebookDisplayName</key>
<string>{{Your app name}}</string>

Source: https://developers.facebook.com/docs/ios/getting-started

Upvotes: 4

Related Questions