简体   繁体   中英

How can I test the Facebook open graph api (user_posts) before Facebook review?

How can I test the user_posts permission before Facebook review? My app can not get the user_posts permission granted even I use the test user to login with Facebook. So do I need to submit a user_post permission review first then test it after approve?

I found my problem: According to FBSDK documents,

@interface FBSDKLoginButton : FBSDKButton

@discussion Note, that if read permissions are specified, then publish permissions should not be specified. This is converted to NSSet and is only an NSArray for the convenience of literal syntax. */ @property (copy, nonatomic) NSArray *readPermissions;

so the solution is:

FBSDKLoginButton *loginButton = [[FBSDKLoginButton alloc] init];
//loginButton.publishPermissions = @[@"publish_actions"];
loginButton.readPermissions = @[@"user_posts", @"public_profile"];
loginButton.loginBehavior = FBSDKLoginBehaviorSystemAccount;
loginButton.center = self.view.center;
loginButton.delegate = self;
[self.view addSubview:loginButton];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM