Facebook Graph api - post to friends timeline issue - facebook-graph-api

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.

Related

Graph API me/friends/ always return empty

i used to create Facebook APP, checked to get friends list using Access token from Graph API Explorer, it always returning empty data
https://developers.facebook.com/docs/apps/changelog
https://developers.facebook.com/docs/apps/upgrading/
Check those Links, Facebook made a big step forward towards privacy. /me/friends only returns friends who authorized the App too, that´s why the result is empty.
With the introduction of the Facebook Graph API 2.0, access a user’s friends list was removed and limited to just friends who use the same application. However, Facebook added two new APIs to allow retrieval of Friend names (and indirectly a friend count). The two new APIs are taggable_friends and invitable_friends.
In v2.0 of the Graph API, calling /me/friends returns the person's friends who also use the app.
Check this link: Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app
When I login with ID my friend and retry send request "me/friends" again. It return ID my Facebook to me. If you need test, you can use this way.
I have currently find this one useful, just posting a snippet:
FB.ui({method: 'apprequests',
message: 'Please sign up .',
filters: ['app_non_users']
}, function(response){
console.log("Response from app requests:"+response);
});
Reference url https://developers.facebook.com/docs/games/requests/v2.1#params
Facebook was updated with version 2.0,
if you want to use Graph API me/friends/, you need to submit your app for review.
Steps to do it:
goto your Apps --> status and Review ---> start a Submission.
then you need to provide your information for review with screen shot.
Submit Items for Approval
Some Facebook integrations require approval before public usage.
Before submitting your app for review, please consult our Platform Policy and Review Guidelines.

How to post on a friends wall with GraphAPI?

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.

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.

How do I combine Facebook social comments plug-in with comments on an Open Graph Action?

Our FB app creates Actions that get sent to users' Friends via notifications.
Those friends can comment on the Action, within the notification on their Facebook feed.
Our app is also using Facebook comments social plug-in to allow people to comment on the "same" post within our app, with those comments associated with a url (as per the FB schema).
We obviously want to combine the facebook feed comments on the "Action" and our app's (FB social plug-in) comments into one, on our app.
The problem is that Actions do not have a URL we can associate the comments social plug-in to (and there is a bug, open from November, preventing a work around https://developers.facebook.com/bugs/164794086987157).
Any ideas on how to combine these two comment streams?
Thanks!

How to share someone's post using Facebook Graph API

My Facebook App posts messages on user wall. I want to share this messages on my wall, same as I click share action under user message. How can I do it using Facebook Graph API?
Yes, you can share using the graph2 api. The way you do it is to use /feed edge and pass the post's url that you want to share as the link.
POST /v2.2/{page-id}/feed HTTP/1.1
Host: graph.facebook.com
link=https://www.facebook.com/{page_id}/posts/{post_id}
Standard Fb permissions to the post you are sharing do apply.
https://developers.facebook.com/docs/graph-api/reference/v2.2/page/feed
This was done today, in a local rails app, using FbGraph2 gem, with the above method.
According to the permissions for accessing posts via the API, it would appear that you cannot do this as it would require accessing the post of another user's timeline that you don't have permissions/an access token for.
Edit From further reading of the documentation you definitely cannot do this: https://developers.facebook.com/docs/graph-api/reference/v2.2/object/sharedposts#publish