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 pag
Are you using the new JS SDK? if so, please refer to this post
"With the new JS SDK you can use the button and it will be rendered and usable but the supported types are less and you will lost the shared count if you used it."
ref: Does the Facebook Share Button work with the New Javascript SDK?
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