react-native-facebook-login
react-native-facebook-login copied to clipboard
use eact-native-facebook-login to request publish permissions
Hi all, Has anyone been able to request publish permission using this project successfully, after user logs in and read permissions are asked? I am requesting read permission at the user login using code below:
return (
<FBLogin
ref={(fbLogin) => { this.fbLogin = fbLogin }}
permissions={["email","public_profile","user_location","user_hometown","user_birthday","user_about_me","user_friends","user_likes","pages_show_list","user_education_history","user_work_history"]}
loginBehavior={FBLoginManager.LoginBehaviors.Native}
onLogin={function(data){
_this.props.onLogin(data.credentials.token, _this.props.navigator);
}}
onLogout={function(){
_this.props.onLogout(_this.props.navigator);
}}
onError={function(data){
}}
/>
);
And then in another file, I am trying to request publish permission like this:
var {FBLogin, FBLoginManager} = require('react-native-facebook-login');
...
FBLoginManager.loginWithPublishPermissions(["publish_actions"],function(error, data){
if (!error) {
console.log("Login data: ", data);
} else {
console.log("Error: ", error);
}
});
And this is the result:

Please help if you know what needs to be done.
Cheers.
@saeed2402 There is no method for loginWithPublishPermission that this package exports. Currently the package wraps only the native logInWithReadPermissions.
in v2.12 there is now LoginManager.logInWithPublishPermissions