Not able to Post on Facebook after getting approval of publish_actions from Facebook App Review team - facebook

I have created app for sending post on user's wall on his behalf. I got publish_actions approval from Facebook team for this app. but still i am not able to send post. I am gettoing following error.
{"error":{"message":"(#200) The user hasn't authorized the application to perform this action","type":"OAuthException","code":200}}
Exception in thread "main" org.springframework.social.InsufficientPermissionException: Insufficient permission for this operation.
There is also a problem when my app asking user for approval, its only showing public profile like following screen shot.

Have a look at https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow/v2.2#login
You need to add a comma-separated list of your permissions for the scope parameter:
scope. A comma separated list of Permissions to request from the person using your app.

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?

Facebook Messenger API pages_messaging permission

I am creating an application where I need a user to be able to grant us access to their facebook page so that all incoming messages can flow through our application (as well as outgoing).
I have this all working correctly, but facebook will not approve my app due to the facebook permission pages_messaging and them "not receiving a response from my bot" (I have been denied three straight times). What am I doing wrong here? We are not using bots, do I even need the pages_messaging permission (I am using their webhook to get incoming page messages, and graph api to send outgoing)?
When submitting app, pages_messaging permission says:
Please provide the page that can be used to test this bot. Make sure the bot is properly connected and functional, otherwise your submission may be rejected.
Here is facebook's feedback from my submission (denied multiple times):
Thank you for your submission. We tested the messenger experience on your associated page and received no response from your messenger bot. Please resubmit with the new, improved version of your bot.
You got to create a bot to use the messaging API: https://developers.facebook.com/docs/messenger-platform/implementation
To just read/send messages:
https://developers.facebook.com/docs/graph-api/reference/v2.6/conversation/messages
You can use the /pageID/conversations endpoint to retrieve all conversations your page has had with FB profiles.
Next you can read/post to the /conversationID/messages endpoint to read/respond to a person.
And you can even subscribe to the conversations field for pages with webhooks.
You will need a page admin's page access token that has the read_page_mailboxes permission scope to set up the subscription, and to read/reply to messages.

Can't seem to figure out how to get the permissions to post to my app wall from my website with my admin token

All I want to do is post to my facebook app wall with my website after certain actions occur on the website...used to work however at some point I started neglecting my code and it stopped working..
So now I want to get it working again however I believe I am having an issue with permissions that I can't seem to get around, as when i attempt to post from my website it is returning the error:
*** GraphAPIError: (#200) The user hasn't authorized the application to perform this action
I applied for the following permissions:
manage_pages and publish_pages
But I am now told the following:
General You don't need any additional permissions to post to Pages or
blogs that you administer. You only need to submit your app for review
if your app will use a public-facing login.
So wondering if anybody can tell me the steps to submit my app for review. Not seeming to see how to do that seemingly most basic action.
Thanks.
You don’t need to submit for review, if you are the only one using the app.
https://developers.facebook.com/docs/apps/faq#roles

Unable to post to facebook page using app token

I am building my first facebook app and am facing a issue.
Task : Build a entirely server side application to be used by the admin of a facebook page to post videos/photos on the page. This should not involve having the admin to log in everytime to generate the user acess and page access token.
What I found : Based on the requirement, I found that app tokens can be used for this purpose. This line specifically hints at the usefulness.
App access tokens can also be used to publish content to Facebook on behalf of a person who has granted an open graph publishing permission to your application
I think that using this will be safe since mine is an entirely server side app.
Problem The docs say that:
GET /oauth/access_token?
client_id={app-id}
&client_secret={app-secret}
&grant_type=client_credentials
will give the app token that can be used in place of user access token.
However, I have not been able to do so. Specifically the error encountered is
Error 200 .The user must have accepted the TOS. Since I have already tried publishing content with page access token, I know this is a permission issue.
The following line
a person who has granted an open graph publishing permission to your application.
does not clarify everything. I came across a related question, but the answers seem to be a bit vague.
It would be really great if someone could give me insights about how this can be achieved.
In order to post to a page, you need at least authorize with the manage_pages permission. If you want to post "as user", you need to add publish_actions and use a "User Access Token". If you want to post "as page", you need to add publish_pages and use a "Page Access Token".
Information about how to generate those Tokens:
https://developers.facebook.com/docs/facebook-login/access-tokens
http://www.devils-heaven.com/facebook-access-tokens/
The error message with the TOS has been discussed a lot of times already, please go to those threads (or find a lot more with the search function):
(OAuthException) (#200) User must have accepted TOS on C# - Facebook
How come I get a "must have accepted TOS" error for test users with app installed?
facebook long term token "(#200) User must have accepted TOS"
Occassional (OAuthException - #200) (#200) User must have accepted TOS
You cannot post to a Page via an App Access Token. This is clearly stated in the docs at
https://developers.facebook.com/docs/graph-api/reference/v2.3/page/feed#publish
A user access token with publish_actions permission can be used to publish new posts on behalf of that person. Posts will appear in the voice of the user.
A page access token with publish_pages permission can be used to publish new posts on behalf of that page. Posts will appear in the voice of the page.
I'd recommend to use a eternal Page Acess Token, so there's no obligation to renew the User Access Token. Have a look at my answer here:
Post to a facebook page without "manage_pages" permission using php
See
https://developers.facebook.com/docs/facebook-login/access-tokens#pagetokens

How to post to my own timeline/page without requesting publish_actions and manage_pages permissions?

I have a blog website and I have a Facebook page where I would like to share updates from my blog. I also would like to share those updates to my personal profile/timeline. I made an application and requested the publish_actions and manage_pages permissions.
It got rejected with the following comment:
You do not need to request these permissions because your blog or CMS
is integrated with an app that you admin. As an App admin, you can
already access these permissions and post to your Timeline or a page
you admin. You can provide access to additional users by adding them
as developers of your App.”
Yes, I am an admin on website, app and Facebook profile/page.
But, can anyone tell me what does it mean?
I read documentation several times. It's pretty clear that I can post even to my own only with access_token. I can get access token if I ask for authorization.
If a request authorization with publish_actions, manage_pages authorization dialog comes with the red banner saying:
"The following permissions have not been approved for use and are not being shown to people using your app: publish_actions and
manage_pages.Submit them for review or learn more."
and
"This does not let the app post to Facebook."
. Then any attempt to post comes with Error #200) The user hasn’t authorized the application to perform this action. It I don't ask for permission I just getting Error 200.
So how exactly I can "already access these permissions and post to my Timeline or a page I admin" as an App admin?
It seems that around mid May they of went back on the review process, at least partially; if your user owns the app and the page then you should be able to publish to your stream or to your page without going through the review process... I guess you just don't have to ask for the permissions that triggers the review process.
I'll be testing this in a bit and I'll get back to you with my results.
UPDATE: Yup. I've just tested it... just ask for publish_actions, manage_pages and status_update and it'll let you autopost on your own page, just ignore the warning about the review process.