Publish custom facebook action on timeline as a Page - facebook

I have created a custom object and custom action with Open Graph, and they have already been approved by facebook. I am able to publish this custom action as a user, but not as a page.
The steps I follow are:
The user authorize the app via the login dialog, granting the publish_actions permission
I exchange the short-lived user_access_token for a long-lived one.
I fetch https://graph.facebook.com/me/accounts?access_token=... and get the page_access_token
I try to publish a custom action on the page timeline on behalf of the page, without success, getting an enigmatic OAuthException with message "An unknown error has occurred."
The auth dialog is correctly asking all the permissions, and posting the same custom action on a user wall on behalf of the user works properly.
Is this a bug or I am missing something? Anyone managed to publish a custom action AS A PAGE?

I don’t think you can undertake actions as a page – actions are ment to be undertaken by real people …

Related

How to create feed using admin account without submit app - Graph API

I'm trying to publish a feed. I receive an error
The permission(s) manage_pages,publish_pages are not available. It could because either they are deprecated or need to be approved by App Review.
After I take a look at their example for app review, I see this.
In my understanding, I think this mean I do not need for a app review if I use admin user access token. Correct me if I am wrong.
As I am the only one who will publish feed on my page, I try to set the access token to my admin account access token. But, I receive another error
(#200) Unpublished posts must be posted to a page as the page itself.
Is that mean the only way I can do is to submit app review?

Not able to post to Facebook using custom-ui project of socialauth-android project

I am not able to post Facebook using the custom-ui project of socialauth-android.
Here is the error log.
10-31 13:18:05.124: D/SocialAuthError(21880): org.brickred.socialauth.exception.SocialAuthException: org.brickred.socialauth.exception.SocialAuthException: Status not updated. Return Status code :403
10-31 13:18:05.124: W/System.err(21880): org.brickred.socialauth.android.SocialAuthError: Message Not Posted
10-31 13:18:05.124: W/System.err(21880): at org.brickred.socialauth.android.SocialAuthAdapter$6.run(SocialAuthAdapter.java:868)
10-31 13:18:05.124: W/System.err(21880): at java.lang.Thread.run(Thread.java:818)
I am not able to find the issue. I am using the same API keys got from the Github source.
You are getting 403 Authentication Error that clearly means that your app is presently not authorized to publish on Facebook profile of the user.
There is some problem the way you are trying to use Facebook APIs. I would suggest you to the latest Facebook SDK for Android as some of the older methods may be deprecated. Let me tell you the approach for doing this right way. (I recently implemented latest Facebook SDK)
You need a permission
There are some specific permissions that you require to do some specific operations with Facebook SDK. For example, You need publish_actions permission if you want your app to post status on user's profile.
Check Out It says,
For example, the publish_actions permission lets you post to a person's Facebook Timeline.
How to get Permissions
You need to show the user a login button which will ask him to do login with his facebook account and notifying the user what your app may do with his Facebook profile. It will show the permissions. In your case you need to add a login button with publish_actions permission. Once the user accepts it, your app becomes authorized to post status.
Complete Tutorial is here for doing the login process of Facebook with permissions.
You will need to do the following,
LoginButton authButton = (LoginButton) view.findViewById(R.id.authButton);
authButton.setFragment(this);
authButton.setReadPermissions(Arrays.asList("user_likes", "user_status", "publish_actions"));
return view;
So you can see we are asking the user to give you the publish_actions permission. It is not mandatory to include user_likes or user_status permissions. You can remove them if you don't need them.
Next what after login
After the user logs in, you get an authentication token in your session with Facebook. So now you can use that to publish on user's profile.
How to post
Now there are many ways to publish posts or status on Facebook. The first one I would like to discuss is using the Graph API
Here is somewhat code, you can use to publish to facebook.
Session session = Session.getActiveSession();
new Request(
session,
"/me/feed",
null,
HttpMethod.POST,
new Request.Callback() {
public void onCompleted(Response response) {
}
}
).executeAsync();
NOTE
You do also need to create developer account with facebook and add your app to its dashboard, generate an app_id and mention the same in your AndroidManifest.xml file.

Posting on my Facebook page from my app: Facebook login doesn't want to grant permission

I have a Facebook page (I'm the admin) and a Facebook app (I'm the developer) and through this app I want to post on this page.
Via https://www.facebook.com/dialog/oauth I'm trying to grant to my app the manage_pages permission of my page. But an error pops up:
"Some of the permissions below have not been approved for use by Facebook. Submit for review now or learn more."
If I click on "ok" I obtain the access token (and then the fb_exchange_token) but, as the pop up says, something goes wrong: the app isn't able to post on the page ("The user hasn't authorized the application to perform this action").
Why is this?
As mentioned in the comments, that error message states the user hasn't authorized to post (perform this action). You need to grant publish_actions and you need to use the page token to post to call as well.

Submiting Open Graph Read action

Facebook keeps rejecting my read action each time I submit it.
Please note that my open graph application functionality includes the deletion of an article as that is required by facebook.
you can visit my website at www.heyngine.com
Please advice
If you are using the Read action on your website, you must use the build-in read action (news.reads) and not create your own action for the same thing. Facebook will reject your action if its a duplicate of a build-in action.
Secondly, when you login to Facebook via your site, it doesn't ask for the publish_action permission. This is required to publish actions to Facebook. Without this, your read action will not get published to the user's profile. Also, why are the 'Social On/Off' and 'Delete' buttons visible when I'm not logged into your website via Facebook?
Facebook Documentation / Policy says the user must have a separate 'logged in' experience to logged out users. I.e. Facebook Users should only see 'Social On/Off' and 'Delete' once they have connected to your site via Facebook, not before as you do currently.

Open Graph - Custom Action & Object

I'm trying to implement the Open Graph custom action and object.
I'm using this tutorial as a reference https://developers.facebook.com/docs/opengraph/tutorial/
Things seem to work fine, and I'm able to use the curl command to post an action on my timeline.
However, when trying to do it from the site, the popup that request for permission doesn't have the open graph action request, even though I request for publish_actions permission.
What am I missing? Do I have to publish the action first before it will show up on the referral dialog? Note that under the app setting, if I go to Auth Dialog > advanced and do "Preview Referral Dialog", the popup dialog looks correct.
If you are an Admin or Developer of the application, you will be able to request permission to publish_actions before the action is approved. Try using the API Explorer tool to test the request you are making from the website: https://developers.facebook.com/tools/explorer/
Are you removing the application before trying to test the action from your site? If you have already approved the app and the requested permission, you won't see the Dialog box again.
Post up the code you are using to request the publish_actions permission. Also, make sure 'Enhanced Auth Dialog' is enabled from the 'Advanced' Settings for your App.