Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook publish_action permission not working for posting

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> 
like image 441
ertugrul.ozturk Avatar asked Nov 10 '11 13:11

ertugrul.ozturk


People also ask

How do I enable permissions on Facebook?

Step 1: In Facebook, click the small arrow near your name in the upper-right-hand corner and choose Privacy Settings. Step 2: Scroll down to Apps and Web sites and click on Edit Settings off to the right. Step 3: If the app you want to adjust is in the recently used list, click on it to edit settings.

What permissions does Facebook need?

Facebook Login allows a person to grant only a subset of permissions that you ask for to your app, except for public profile, which is always required.


2 Answers

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.

like image 180
TLK Avatar answered Sep 23 '22 02:09

TLK


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

like image 26
Mightian Avatar answered Sep 27 '22 02:09

Mightian