I can't seem to find an answer for this. Probably my Google-fu is letting me down.
Is there a way to use FB's Graph API (or any other way), in order to "share" a page's post on an authenticated user's wall so that it will increment the "share number" as show in the attached photo?
The way you do it is to use /feed edge and pass the post's url that you want to share as the link. Standard Fb permissions to the post you are sharing do apply.
Post your link on your wall and News Feed In order to do this, you'll want to paste your website's URL in the post box. You can find the post box in your Facebook Business Page under 'posts. ' Once you paste your URL, wait for a featured image of your website and title to appear.
The Graph API is the primary way to get data into and out of the Facebook platform. It's an HTTP-based API that apps can use to programmatically query data, post new stories, manage ads, upload photos, and perform a wide variety of other tasks.
Okay, my answer varies between "no" and "maybe" depending on how exactly you want to accomplish this.
Do you want it to be a programmatic, automated sharing mechanism entirely dependant on code, that doesn't require the User to actively share it?
If so, the answer is no. Actually it would also probably violate Platform Policy too, but it isn't possible.
Do you mind if it is a dialog-based share, that has inconsistent behaviour for different types of Page posts?
If so, you are in luck. Somewhat. There is a now-deprecated function called "sharer.php" which used to be used for the Share Button, when Facebook still supported that. Though this has been deprecated, it is very unlikely to be removed, but unfortunately it does mean there is no documentation around. Luckily though, it is really simple:
http://www.facebook.com/sharer.php?u=https://www.facebook.com/coca-cola/posts/10152033676358306
The above is an example of sharing a Post on the Coca Cola Facebook Page. You would want to URL encode the u
parameter, of course. You could have this as a plain link, or you could attach it with Javascript to the onclick of a button. However, here come the caveats:
If you want to pursue this route anyway, here are my recommendations:
type: status
12345678_987654321
into https://www.facebook.com/12345678/posts/987654321
or take the /actions/link field from each Post (there will be one for Comment and one for Like but they'll be both the same)type: link
, grab the link
field and just use that with sharer.php as above. This won't increment the Share count as you want, but it will properly re-share the link. Hope some of this helps you, ultimately the answer that works best for you maybe the 'no'.
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}
Permissions to the post you are sharing do apply.
https://developers.facebook.com/docs/graph-api/reference/v2.2/page/feed
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With