Facebook graph api: get post sharing history - facebook-graph-api

I need this functionality: application must check shared or not user given post on his wall. Now I'm able get posts from user wall, and shared posts have status_type shared_story, but I can't get from which post it was shared, is there any way add this functionality with facebook api?

Related

Get list just of visitor posts / shared events etc

We have a public Facebook page for our dance group. Friends and strangers will post to our Timeline (sharing events etc) – you can see them all under Visitor's Posts, which opens in a modal on the page.
I want to be able to pull all Visitor's posts with the graph api.
The Visitor's posts are not included in the basic {page-id}/feed request, so i cannot filter for them post-retrieval.
I have tried the {page-id}/tagged/ Edge, but for some reason this excludes certain posts.
Graph request with page ID 93039009689/tagged/
https://developers.facebook.com/tools/explorer/391224331052795?method=GET&path=93039009689%2Ftagged%2F&version=v2.5
Compare to Visitors Posts feed here: https://www.facebook.com/contactinsydney/posts_to_page/
Any ideas?
Using the Graph Explorer with the User access token should not retrieve all visitors posts. Did you try with the Page access token? It worked for me.

Posting on facebook user wall a custom field

Using facebook graph API and user access token(and cURL), I am posting message, photos to the user wall. Can anybody guide me, I want to post a photo, its description and along with this RATING(custom parameter/field). What I mean is, is there a way to add a custom field and publish/post on user's wall.

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.

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

Share details of post on a wall

I am interested in tracking the user IDs of those who are sharing the wall posts on my fanpage. Does the graph api now support returning the user IDs of the user who have shared the wall post on their wall like I can see who all commented & liked the post?
Any possible workarounds?
yes it's possible you can do through facebook graph api.
http://developers.facebook.com/docs/reference/api/post/
get all post with comments + comment user id + liked user id.
these data managed by your own database.