Search code examples
facebookfacebook-graph-apifacebook-appsprivacyfacebook-app-requests

Set default value for "Who can see posts this app makes for you on your Facebook timeline"


How can I set default value of "Who can see posts this app makes for you on your Facebook timeline" to "Only me" on my app installation dialog? Is there a way to block it so that they users cannot change it to "friends"?

Thanks


Solution

  • If you're using the ios sdk, you can use this to initialize the session:

    - (id)initWithAppID:(NSString*)appID
        permissions:(NSArray*)permissions
        defaultAudience:(FBSessionDefaultAudience)defaultAudience
        urlSchemeSuffix:(NSString*)urlSchemeSuffix
        tokenCacheStrategy:(FBSessionTokenCachingStrategy*)tokenCachingStrategy;
    

    The defaultAudience sets the audience for the posts. If you look in the SDK code, you can see the FBSessionDefaultAudience values. It's in FBSession.h. I'm using the 3.1 SDK.