Was my Facebook wall POST successful? - facebook

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/

Related

Posting to Friends wall using Facebook C# Sdk

I'm designing a WP7.1 App that publishes to other user's wall, using Facebook C# Sdk, without user interaction (i.e. in Background).
I searched for methods and discovered that a POST would do the things.
However, Facebook Roadmap Page and this Blog Post, mentions that the ability to post to other user's wall by Graph API has been removed and instead Feeds Dialog must be used.
My question is:
- Is this change going to affect the above POST Method.
- If Yes, then, is there a workaround to POST on other user's wall without User Interaction ( i.e. IN Background).
now to post on friends wall, either you must use feed dialog, that will prompt user.
but if you don't want to prompt user then you can post on your user wall with a tag to user's friend, assuming friend approve the tag it'll show up on tagged friends wall.

How do I use the Facebook API to query whether posting is permitted on a user's wall?

I'm designing a web app that allows people to post on peoples wall using the Facebook Graph API. Basically my app users will be able to search for people by name, then write a message and finally post it to their wall.
The problem is that in certain cases people on Facebook block the option for others to post on their wall. So when sending the post from my app Facebook will return an error.
My question is whether the Facebook API returns a parameter that states whether or not it's possible to post to somebody's wall based on their permission on Facebook.
Thanks!
The FQL user table has a field called can_post:
can_post | bool | Whether or not the viewer can post to the user's Wall.

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).

How to post to a user's wall at a later date

I'm trying to figure out how, after a user has opted into my Facebook Application, to retain their credentials so as to post to their wall at a later time. I see apps doing this all the time, but I'm unclear where/how they store the user's login (I'm guessing they're not actually holding on to U/P but rather just have some key to post to the user's wall), and then do the post at some later time.
I'm unable to find the documentation for how to do this at the facebook developer site and am hoping someone can point me in the right direction.
TIA
Ask for publish_stream permissions then post to that user's wall using your "app" access token if the user access token has expired.
Facebook documentation here: http://developers.facebook.com/docs/reference/api/permissions/
publish_stream
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. However, please
note that Facebook recommends a user-initiated sharing model.

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.