Facebook publish_action permission not working for posting

46,053

Solution 1

I suspect you are not correctly asking for the permission. This drove me crazy for hours. Even though I was correctly asking for permission and it appeared to authenticate, in reality the permission was not being granted because I had not setup the application correctly for open graph.

When asking for publish_actions, Facebook shows a preview screen of what sort of aggregations your app will create on their timeline.

In other words, if the preview isn't working, Facebook won't ask for the permission so you're asking in vain. Facebook doesn't make this clear in the docs, but everything needs to be perfectly setup with your app on Facebook to get this to work right.

  1. Enable Enhanced Auth Dialong in the advanced settings of the app
  2. Make sure you have at least one action and one object set up in the open graph section
  3. For each action you must have an aggregation set up.

If you do not do all of these steps, there can be no preview and so Facebook won't ask for permission no matter what.

Solution 2

I know it might be very late to post an answer[but it might be helpful to others], but as of 2014 if you want to post anything to the user[apart from the app registered developer] timeline you need Facebook permission i.e the app needs to be submitted for approval Please refer the following links.
1) https://developers.facebook.com/docs/facebook-login/permissions/v2.0#review
2) https://developers.facebook.com/docs/apps/review/
3) https://developers.facebook.com/docs/facebook-login/permissions/v2.0.
you can check that it's right below the overview section. This has been verifed with the latest version of the SDK

Solution 3

Currently publish_actions is only usable for test users and developers of your app (or for posting scores and achievements if your app is in the Games category) - there's no way to post Open Graph objects and actions except for testers of your app - the APIs are still in beta

[edit] if you're using the add-to-timeline button you might need to enable the 'enhanced auth dialog' migration in your app's advanced settings [/edit]

Solution 4

I was going through this problem recently, and I succeeded to solve it.

publish_actions is a scope that Facebook has to manually approve for the app to use. Starting a submission on the app's settings page is needed with detailful description and demo of Your app. They answer in around a week after a human tester is done with checking the app.

Afterwards Your approach works perfectly.

Share:
46,053

Related videos on Youtube

ertugrul.ozturk
Author by

ertugrul.ozturk

Updated on July 21, 2022

Comments

  • ertugrul.ozturk
    ertugrul.ozturk almost 2 years

    Currently i can post news feed updates using objectids of some of my web pages to facebook users who have liked those pages.

    Now i'm trying to test the new open graph and custom actions to do the same; posting updates to users who made a specific action on my web site. But even though i get publish_actions permission with my app, and using my facebook account and some dummy test user accounts for my app (i know that until timeline is released, only devs and test users can use said permission), when i try to post i get this error message: "{"error":{"message":"(#200) Requires extended permission: publish_actions","type":"OAuthException"}}".

    I also changed my app type to Games so i can properly get publish_actions permission from auth dialog.

    Any ideas that can help me with this? Or do i just have to wait until timeline is released before i can test new open graph posting properly?

    Edit: request sent contains these parameters;

    to: https://graph.facebook.com/feed
    ["access_token": "given access token", 
    "message": "post message", 
    "caption": "post caption", 
    "picture":"picture url", 
    "link": "link to post", 
    "description": "post description", 
    "ids": "object ids separated by commas"]
    

    Edit2: I ask for permissions via Add to timeline button:

    <fb:add-to-timeline show-faces="true" mode="button" perms="offline_access,publish_actions,publish_stream"></fb:add-to-timeline>
    
  • ertugrul.ozturk
    ertugrul.ozturk over 12 years
    Thanks, but I'm a developer for this app, and i'm trying this with my own fb account and test users assigned to the app. According to documentation, and your answer; i should be able to post on my news feed or testers news feed even if it's on beta.
  • Igy
    Igy over 12 years
    Updated my answer, i missed the fact you're using the add to timeline button
  • RichieHH
    RichieHH over 12 years
    I have enabled the enhanced auth dialog, added a timeline button and its still not working for me. Has original poster got a solution?
  • João Bragança
    João Bragança over 12 years
    +1! If I had to rely on facebook's docs I'd never get anywhere.
  • Gervase
    Gervase over 11 years
    Is this answer still valid? I set up the action in Apps + Appid + Permissions and added "publish_actions" to the "User & Friend Permissions" field... although not sure if it shouldn't have been the "Extended Permissions:"....
  • TLK
    TLK over 11 years
    Haven't messed with this in a while. LMK if it's changed and I'll update this answer (or feel free to post a new one.)
  • fish40
    fish40 about 10 years
    what you mean by this lines Make sure you have at least one action and one object set up in the open graph section' and 'For each action you must have an aggregation set up'. how could I do this?
  • santiago_apr1
    santiago_apr1 almost 10 years
    Can all the apps developers post? Or only admin of the app? From the admin account of the app, I have added two developer accounts; I am not able to post using developer account, though I can post using admin account...? Is that so?
  • Mightian
    Mightian almost 10 years
    all the developers can post make sure they have accepted the invitation[once you add them Facebook sends them a invite], as an alternative workaround you can add them as testers also
  • santiago_apr1
    santiago_apr1 almost 10 years
    I added a developer email from admin. And the developer can see the see the app from his account, he can see himself listed as developer in Roles section of the app. But I am not able to post using developer account, though I can post using admin account... Am I missing something...? Can you help me out..
  • Mightian
    Mightian almost 10 years
    If you are able to see them registered as developer then they must be able to use the app feature like posting,getting data etc, just to try it out[might not be an actual solution] please select the option that says show app to public to "yes", also as a work around you can create a test app[a clone of your original app] and try it out
  • santiago_apr1
    santiago_apr1 almost 10 years
    It's working.. I used the wrong App-Id.. I had so many test apps in my account.. my bad. So from admin account you can add testers/developers for your app, if they are your friends and they must accept your invitation. Then all the testers/developers can use the publish_actions permission.
  • Kevin Pimentel
    Kevin Pimentel over 9 years
    Great thanks, this turned out to be the solution for me. I was trying to post from a non developer account. When i switched to using the allowed developer account I was able to post no problem. The app will need to be submitted for non developer accounts to post.
  • Igy
    Igy almost 9 years
    I noticed a recent upvote on this question - note that this is very, very out of date now - you should check the current documentation about Login Review if attempting to create new apps utilising publish_actions permission
  • Eenvincible
    Eenvincible almost 9 years
    what do you mean by facebook standard app installation process?
  • Bok McDonagh
    Bok McDonagh about 8 years
    How do you set up an aggregation?
  • user2056563
    user2056563 almost 8 years
    I have generate the signed APK and the i am not able to share post using publish_actions, so do i need to manually ask them to approve? It says "Complete the notes for this item before submitting." ?
  • István Pálinkás
    István Pálinkás almost 8 years
    Yeah, You need to ask for a manual approval, also attach some screenshots about your app/website so they know in what context You want to share in Your users' names. I am not sure, but I guess You also need to attach a screencast video describing the usecase.
  • user2056563
    user2056563 almost 8 years
    Do you have any idea how much time will it take for them to approve ? is that documented ?
  • István Pálinkás
    István Pálinkás almost 8 years
    I didn't find it in the docs, but my experience is, that they respond in 2-4 workdays.
  • Supertecnoboff
    Supertecnoboff about 6 years
    I'm guessing it's even more out of date in 2018? Because there is now a whole bunch of settings you have to go through, in order to request permission