How to post on a friends wall with GraphAPI? - facebook-graph-api

I'm using GraphAPI for posting to a friend's wall but I'm unable to do it.
I'm trying the below link:
http://graph.facebook.com/friendID/feed
Can anyone help me how to post to your friend's wall?

As of february, you can't post content to a friend's wall using the API - see here: https://developers.facebook.com/roadmap/completed-changes/#february-2013
Removing ability to post to friends walls via Graph API We will remove
the ability to post to a user's friends' walls via the Graph API.
Specifically, posts against [user_id]/feed where [user_id] is
different from the session user, or stream.publish calls where the
target_id user is different from the session user, will fail.
You can post links using the FB.ui function w/ the 'to' parameter set to a friend's id, however.

See the following change from 6th March 2013, posted on the list of completed changes in the Facebook Developers' Roadmap:
Removing ability to post to friends walls via Graph API
We will remove the ability to post to a user's friends' walls via the Graph API. Specifically, posts against [user_id]/feed where [user_id] is different from the session user, or stream.publish calls where the target_id user is different from the session user, will fail.
If you want to allow people to post to their friends' timelines, invoke the feed dialog. Stories that include friends via user mentions tagging or action tagging will show up on the friend’s timeline (assuming the friend approves the tag). For more info, see this blog post.

Related

Facebook Graph api - post to friends timeline issue

when I tried to post to my friends timeline using facebook graph api, I got
{"error":{"message":"(#200) Feed story publishing to other users is disabled for this application","type":"OAuthException","code":200}}
Enabling something while creating access_token will resolve this problem ?
If so what should I enable.
Thanks,
Padmaprasad G
This feature has been removed the 6th February : http://developers.facebook.com/roadmap/completed-changes/
Look here how to do it Facebook App: Will fb.api method post on friend's wall?
Yes, this was announced few months back and took effect on Feb 6th - http://developers.facebook.com/roadmap/completed-changes
Removing ability to post to friends walls via Graph API
We will remove the ability to post to a user's friends' walls via the Graph API. Specifically, posts against [user_id]/feed where [user_id] is different from the session user, or stream.publish calls where the target_id user is different from the session user, will fail. If you want to allow people to post to their friends' timelines, invoke the feed dialog. Stories that include friends via user mentions tagging or action tagging will show up on the friend’s timeline (assuming the friend approves the tag). For more info, see this blog post.
The workaround is to use the Feed Dialog which allows users to post the same content, but choose the user they want to post it to.

Montreal Canadiens Facebook Graph API returns no posts

I'm using the Graph API to return Facebook posts from all NHL teams. Every team returns the posts fine except for the Montreal Canadiens, which returns no posts. I verified that there are posts on their wall, and that the Facebook ID that I used is correct(see here)
I get back an empty JSON list when I try using this link for the Canadiens:
https://graph.facebook.com/110877132302973/posts?access_token=(my access token)&limit=10
Any help would be appreciated! Thanks.
Haotian
The posts on that page all have a custom privacy setting - you need to make sure you're attempting to access them using a User access token for a user that meets whatever restrictions they've applied.
App or page access tokens won't be able to see the posts, nor will user tokens for users who don't meet the restrictions

disabling facebook comments with actions field on wall posts

My app allows users to interact with each other for a unique purpose. As part of this experience I post on user's wall so his/her friends can know about the post from user and they can come to app for interaction. But in this case, users may just end up commenting on the facebook page itself and my app will not have any knowledge of this interaction. To avoid this, I am wondering if I can disable comments on this post. Graph API documentations states that I can use the "actions" field on wall post for such purpose. I tried that with various combinations of Comment and empty link or link that takes the user to my app etc. But I notice that no matter what I set, facebook always shows link to the wall post instead of what I tried to put.
Any thoughts on how to achieve this purpose?
Thanks.

Posting on behalf of user set privacy to "Only you" like it to be "Everyone" or "Friends"

I'm trying to post to wall on behalf of a user (user access token) via the Graph API. The post is successful and I get a api ID for the post. But I can't view it as the posting user.
On my friends wall the post shows up but it are marked in "privacy" settings as "Only you".
Are you able to set some other privacy setting like "Everyone" or "Friends" when using the graph api?
This sure has with facebook privacy settings of personal profile, and can't be set via an API request/post.
The privacy parameter of https://developers.facebook.com/docs/reference/api/post/ can't change this when posting to other than (access token) owners wall.
Note: This privacy setting only applies to posts to the current or
specified user's own Wall. Facebook ignores this setting for targeted
Wall posts (when the user is writing on the Wall of a friend, Page,
event, group connected to the user). Consistent with behavior on
Facebook, all targeted posts are viewable by anyone who can see the
target's Wall.

How can I allow my users, who create pages on my website, to communicate back to those people who click the Facebook "Like" button on their pages?

OK, apologies for the verbose title. Let me give the background in a bit more detail.
My website allows my registered users to create new pages, each of which has its own unique URL. Each page has a Facebook "Like" button on it. I've already implemented Facebook Open Graph API meta tags so that the pages are proper open graph objects, and when some other visiting Facebook user "likes" the registered user's page, a post appears on that Facebook user's wall saying they have liked the page. The Facebook Like widget also displays the number of "likes" that page has received as normal. So far, so good.
What I want to do is allow my registered users to be able to communicate back to the Facebook users who have liked their page. The community of "likers" for a page is a potentially valuable social media resource to the registered user, if only they could communicate back.
I am aware of the "admin page" link you get beside the Like button, which can be used to post to these people, but that is not an option for my registered users as they have no privileges in relation to the Like button.
What I want to do, if possible, is setup a form to capture the registered user's message back to the Facebook users, and then my website sends the message on their behalf, without having to ask for any extra privileges from the Facebook users.
The following Facebook documentation pages seem to say this is possible, but having followed the Open Graph API documentation, I can't get it to work as described - http://developers.facebook.com/blog/post/465/ and http://developers.facebook.com/docs/reference/api/ ("Publishing" subsection). I can get the access token correctly in the first request, and plug that into the second request to do the post, but that doesn't seem to do anything and doesn't return any error.
Since it doesn't work for me, I'm wondering if this is possible as described, or do I need to get some sort of extra permission to do this? I've seen reference to offline_access permission but as I'm new to this stuff I am not sure how it would fit in. If I have to get the Facebook users to grant permissions, this is not going to work as envisaged.
Any thoughts would be most helpful.
The short answer: No, You will never been able to post on someones wall as another user.
The long answer:
You could try to ask for offline access but then you are asking the user to hand over all their facebook data and give you access todo whatever you like their accound, so that is not likely to happend.
The next problem is that they have to be friends to be able to post on each others walls.
Thats why Pages was implemented, so that organisations could announce/talk with the people interested.
However if you have created the like button correctly and give the pages correct meta data, you are able to post to user who have liked it.
Scroll down to Publishing:
http://developers.facebook.com/docs/opengraph/
Just add a form for your user and let your system publish to the correct page, you probably will need a offline token from your own account or similar to use on the server.
Another more complex way could be to generate a facebook page for each page you have on your server.
When the user creates a page on your system a page is created on facebook but as your app as admin.
And when another user likes the page they like the facebook page, hence you have the possibility to post in that page and speak to the user who liked it. (whooa thats a mouthfull).