Can't post to user's wall, though I get publish_stream permission - facebook-graph-api

I'm implementing an app which will post to user's wall.
I specify appropriate scopes (including publish_stream) via php-sdk, display the authentication page and can confirm that my app requires publish_stream. But when the app tries to post to user wall, I get the following error message:
The user hasn't authorized the application to perform this action
Also, my app cannot get public_stream permission when I confirm the app from user's privacy setting.
I could confirm that my app's authentication of publish_stream worked well one weeks ago.
Are there any problem regarding publish_stream permission?

fb in your app insight to see if your app is restricted for publishing stream

Related

Facebook is not asking the user to provide permission to my site to post on the user's page

I was using Facebook API's to post content to pages owned by users of my site. Suddenly it stopped working. I read about it and I found out that my app should have manage_pages and publish_pages permissions to post on a page.I submitted my app for review and got those permissions from Facebook. I am using graph API v4.0.
Now while the OAuth dialog, Facebook is stil not asking the users of my site to provide my site for these two permissions. When I try to link my own account through which the app was submitted, Facebook is prompting to provide these two permissions as well and everything seems to work fine.
public function getAuthorizeUrl($reditectUrl,$scope=['manage_pages','publish_pages','pages_show_list']) {
$helper = $this->fb->getRedirectLoginHelper();
$loginUrl = $helper->getLoginUrl($reditectUrl, $scope);
return $loginUrl;
}

How get publish_pages permission, to post on own business Facebook page using Graph API?

I am making a server-to-server Facebook 'app' so that some of the news articles we post to our own website can be posted on our own Facebook page too. I have read 14 squintillion pages of documentation, but cannot find how to get the publish_pages permission for myself or the app.
I have coaxed the app through the review process, and got the manage_pages permission allowed. I thought I had to submit all over again, to get publish_pages too, but the documentation says no. Apparently anyone appearing in the Roles for the app can grant the necessary permissions.
I have set myself up as admin for the app, yet when trying to get a token using the Facebook developer tools, I am never shown publish_pages. So even if I create a non-expiring token (my end goal) it is rejected with a message about the lack of publish_pages.
Shouldn't I be seeing more permissions listed here?
I'm sure I've read all relevant parts of the official documentation, plus StackOverflow answers and several unofficial walk-throughs, but I cannot work out what I am missing...
I thought I had to submit all over again, to get publish_pages too,
You do.
but the documentation says no. Apparently anyone appearing in the Roles for the app can grant the necessary permissions.
That is for apps in dev mode. Any of those users can grant the permission to your app, while it is in dev mode. But whatever you publish through your app, will only be visible to this group of users only, and not to the general public.
For the content to be visible to everyone, your app needs to be in live mode.
Before you can ask people - even those with a role in the app - for publish_pages when your app is in live mode, you need to submit that permission for review.

facebook graph api app permission Workplace Account

I have been developing using the FB.api(), but now I get the following error message
"This app does not have permission to manage this Workplace account"
when I try and make a new post, but I can still delete posts!!
I do not think I have changed any permissions, The Page is a Test Page, My Account is set up as administrator for both The Page and The App. I cannot see anywhere on either The Page or The App where I can provide permissions.
I have not got a Workplace Account, and cannot see how I might add/edit/remove one.
Well, how bizzar....If you post a new message with FB.api() and have property
formatting: 'MARKDOWN'
then you get an error about permission on Workplace Account!!

Auto post on friends wall when user logged in using Graph API for first time

When first time a user logged in through Facebook Graph API APP, whether any auto post will be triggered to others wall on user's behalf regarding new APP first Login?
APP is given permission to read_stream, publish_actions.
That is not allowed and not possible for many obvious reasons:
You are not allowed to autopost, not even on the wall of the authorized user. Every single post has to be approved by the user.
You are not allowed to prefill the message, it must be 100% user generated.
You can´t post to the wall of friends (anymore), that would be spam anyway.
...also, you will not get read_stream approved, but you would not need that permission for posting anyway:
This permission is granted to apps building a Facebook-branded client on platforms where Facebook is not already available. For example, Android and iOS apps will not be approved for this permission. In addition, Web, Desktop, in-car and TV apps will not be granted this permission.
Source: https://developers.facebook.com/docs/facebook-login/permissions/v2.2#reference-read_stream
Don´t create spammy Apps. User friends don´t care if the user just started using your App. You may want to read this too: https://developers.facebook.com/docs/apps/faq#invite_to_app

Is it possible to get access token for multi Facebook user?

I created web application using Facebook C# SDK 5.3.2. I can post messages to my wall. But I want to collect access tokens for my friends' Facebook accounts and store them to use later to post messages to their wall.
Is it possible to get their access token with their Facebook account info. I can get access token for myself with "App ID" and "App Secret. Do I need also add application for my friends' Facebook to get this credentials.
You don't need to store access_token for any user, since it's something time based.
Instead ask for publish_stream permission and post messages to their wall using application access_token
From Facebook documentation on publish_stream permission:
Enables your app to post content, comments, and likes to a user's stream and to the streams of the user's friends. With this permission, you can publish content to a user's feed at any time, without requiring offline_access. However, please note that Facebook recommends a user-initiated sharing model.
the only way to get it done, is that your friends login into your application with their accounts and grant you the publish permission (if you want to publish when they are online) and the offline_access permission, to publish in any moment.
You have to think in the big security issue that this situation potentially represents.
Good luck.