Reputation: 11
how to give publish_stream permission?If i trying to post on own wall,still it is saying that user is not authorised the application to do this action.I don't have any app.
Upvotes: 0
Views: 115
Reputation: 49
There are a few ways to do it. Personally I would use the Javascript SDK. Another way is to update your Facebook App settings (using Facebook Developer App) to require users to permit Extended Permissions 'publish_stream'.
Below is code using the Javascript SDK FB.api function:
FB.login(function(response) {
if (response.authResponse) {
// user is logged in and granted some permissions.
console.log("user is logged in and granted some permissions.")
} else {
// User cancelled login or did not fully authorize.
console.log("he failed to login or something")
}
}, {scope:'publish_stream'});
Inside scope: you can put a comma-separated string of permissions, if you want to ask for multiple.
Upvotes: 1