Is publish_actions required to post on user own wall? Facebook API - facebook

When requesting publish_actions permission the message says the app is willing to post on your friends' wall but I actually just want my app to let the user post videos on his own wall. Do I need this permission to do so?

If you just want to share a Link (to a Youtube Video, for example), you can just use the Share Dialog - no authorization or permissions needed: https://developers.facebook.com/docs/sharing/reference/share-dialog
If you want to upload a photo or video, you will need to authorize the user with publish_actions. Keep in mind that the message must be 100% user generated.
Check out the "Publishing" part of the Facebook docs: https://developers.facebook.com/docs/graph-api/reference/v2.1/user/videos
A user access token with publish_actions permission can be used to publish new photos.
...well, that is actually a bug in the docs, it should be "videos", not "photos", of course. I´ve filed a bug report for this: https://developers.facebook.com/bugs/303448543173296/
General information about sharing: https://developers.facebook.com/docs/web/share

Do you use standards dialogs? According to the facebook api documentation you don't need this permission for theses dialogs.
(see: https://developers.facebook.com/docs/facebook-login/permissions/v2.1#reference-publish_actions)
If you use the Facebook Graph API you don't need this permission if you only want to post on the user feed.

Related

Alternative for Facebook API without using "publish_actions" to publish a photo

as per facebook's documentation they will be removing "publish_actions" permissions after August 1, 2018. As an alternative they have suggested to use Share Dialog https://developers.facebook.com/docs/sharing/reference/share-dialog , But share dialog doesn't serve my purpose as previously I was publishing photos to users timeline from my plugin using "publish_actions" adding that photo a any specific album present on user's account, however Share Dialog is now allowing me only to share link of the photo which gives user different exeprience. Is there an alternative way to post photo to any of the user's album without using "publish_actions" permission.
TIA
Ruby
Take look on publish_groups.
"The publish_actions permission is deprecated in Graph API v3.0. Apps can still post stories via mediated experiences like the Facebook Share Dialog on the web, or the Share Sheets for iOS and Android. Apps can publish to groups through the publish_groups permission, which requires an app go through review."
https://developers.facebook.com/docs/apps/review/faqs/?fragment=graph-api-3-0
section:
"My app uses the user_managed_groups permission. Is it affected by v3.0?"
Hope this helps

How to share post to Facebook using Feed Dialog v2.11

I want my site users to share a custom post to their Facebook timelines using Feed Dialog. But I am stuck with permission issues. The post_id is not coming after the user successfully shared the post. The post_id requires the app to have publish_actions granted, as per the Facebook doc (https://developers.facebook.com/docs/sharing/reference/feed-dialog).
Snapshot of the feed-dialog doc
But when I tried to give the permission in the App Review section by adding publish_actions, it says that my app should not be using publish_actions to using Feed Dialog feature. Both of the documents are contradicts each other. I am confused.
Snapshot shows where it denies to use publish_actions permission for Feed Dialog
(https://developers.facebook.com/docs/facebook-login/permissions/)
Please guide me if I am missing something at this point. Thank you in advance.

Post on a company facebook page wall on behalf of a user

I have a wp7 app that connect with facebook and lets assume i have the users access token
I am wondering if it is possible to write on the wall of some company facebook page as the user. (i have no ownership of the facebook page and not affiliated with it in any way)
If it is, do you know which permission do i need to obtain ? would love to get any kind of code snippet or a direction i should follow.
Thanks.
it's not possible to write on the wall on behave of the user. You always get a token in the context of a Facebook application - so it will be the app posting on the wall, not the user. And the maximum permission app can ask a user for is publish_stream which allows you (your app actually) to:
Enables your app to post content, comments, and likes to a user's
stream and to the streams of the user's friends.
so in order to post to the company wall, you need to:
Request publish_stream permission from the user
Issue a post request to https://graph.facebook.com/<>/feed url with your message
It's really easy to test. Go to https://developers.facebook.com/tools/explorer, click on "Get access token", select "publish_stream" permission in "Extended" tab, set action to POST, enter "LGUSA/feed" into URL field, click on "Add a field", enter "message: test" and click POST. You will get ID of your post back. See screenshot attached
Sorry this is going to be a bit vauge, but here goes:
First the user is going to have to be authenticated to facebook. There is a good example here. This will give you an authentication tolken to allow you to interact with the API.
The user is going to need facebook permissions to write to the wall. Facebook permissions are described here. I don't know about the specifics of your problem, but with more details I may be able to help more.
then you shoud be able to post to the appropiate wall using the facebook graph api (you'll probably need to be signed up to facebook with a developer account to get to this page).

Was my Facebook wall POST successful?

I can post on my friends wall after authenticating the Facebook Graph Explorer (or any app with publish_stream permission for that matter).
Facebook Graph Explorer
However, how can I validate in my app that the message has actually posted successfully to my friends wall? In some cases, I can go to my friends page and see my message appear, however, in other cases, I notice that there is no message on their wall.
In either case, Facebook returns an object id, like:
100002349949136_184284371659893
Yet, when I view these posts on the graph (link above), they both return false... The rules of my app require that a message is posted on another user's wall.
How can I validate that a message appears on a Facebook wall? Or how can I filter user's who have restricted 3rd party apps from posting on their walls?
The post must be publicly viewable if you're attempting to read the post without an app access token. If it is not publicly viewable, then you must have read_stream permission set in the app you're attempting to read the post with.
Here is the documentation. https://developers.facebook.com/docs/reference/api/post/

What facebook permission does my app need to post to a facebook user's feed asynchronously or when the user is offline?

I have tested with "publish_stream" permission, and my app can publishes an item to the user's feed with this permissiom. But there is a major problem with this
When the "publish_stream" permision is reqisted, it frightens the users because the Facebook warning or prompt is scarry : "Post to Facebook as me. .... may post status messages, notes, photos, and videos on my behalf"
For a lot of users, this is a deal breaker. They do not want anyone posting as them
b) I became of fan of TopGear and CBSnews -- these applications are able to post news to my newfeed -- without me giving them "publish_stream" permission.
So what is the best permission to use for this purpose ?
publish_stream is required for the app to publish as the user to the users feed via the graph api. No permission is required if you are using the javascript FB.ui method of publishing because the user has the option of typing in their own message and/or cancelling it.
If you become a fan of a page, those pages aren't publishing updates as you. You are simply seeing their updates in your home page stream. Your friends won't see those updates unless they also become a fan of that page.