Leo Jiang
Leo Jiang

Reputation: 26193

How can I request the "publish_actions" permission?

Washington Post (https://www.facebook.com/dialog/permissions.request?app_id=225771117449558&display=page&next=https%3A%2F%2Fapps.facebook.com%2Fwpsocialreader%2F%3F&type=user_agent&canvas=1&perms=user_about_me%2Cuser_likes%2Cpublish_actions") is able to request the publish_actions permission.

It says this on Facebook:

While in Open Graph Beta, the 'publish_actions' permission can only be requested from developers and test users of your app. The 'publish_actions' permission will be ignored if requested from any other user.

When I try requesting the permission from non-developers, this shows up:

Logging in will not add this app's activity to Facebook.

Upvotes: 4

Views: 15024

Answers (5)

Hardy Android
Hardy Android

Reputation: 865

Request for publish_action

LoginManager.getInstance().logInWithPublishPermissions(this,Arrays.asList("publish_actions"));

But on 1st, August 2018 Facebook announced new policy so, After 1st, August 2018 publish_action no longer available for Facebook share post programmatically.

Read More about Facebook Updated Policy: click here

Upvotes: 1

Mahfuz Ahmed
Mahfuz Ahmed

Reputation: 731

User this function

function postToFacebook() {
 FB.ui({
  method: 'feed',
  link: 'www.fb.com/mahfuzcmt',
  caption: 'bitSoft',
 }, function(response){});
}

and call

 <a href="#" onClick="postToFacebook()">Post to Facebook</a>

reference

Upvotes: 0

Matt V
Matt V

Reputation: 11

In addition to the Facebook app authentication settings, you have to updated your fb:login-button to request the publish_actions permission.

See: Facebook Developers - Login Button

Upvotes: 1

Patrick Jane
Patrick Jane

Reputation: 23

Yes, this will work only when the timeline is rolled out to everyone. When is the revised date, I am not aware.

Upvotes: 1

Igy
Igy

Reputation: 43816

Requesting publish_actions currently works as follows

  1. If your app is in the Games category and you're using the Scores and Achievements API
  2. For testing the new Open Graph custom objects and actions - this will only work for developers/test users of the app who have Timeline enabled - to use it with regular users you'll have to wait until after Timeline launches and apps start getting approved to use the new APIs

Upvotes: 1

Related Questions