4

this is my java code using resfb lib to post something on my facebook groups feed:

FacebookClient fb=new DefaultFacebookClient(token);
FacebookType message=fb.publish(pid+"/feed",FacebookType.class,Parameter.with("message", description));

now what do i do to share posted article?

thanks a lot for your help!

SuperYegorius
  • 754
  • 6
  • 24
  • What exactly are you trying to do? Have your actual FB user share the post on the page so that it appears on the user's timeline as well? – mgorven Mar 05 '14 at 03:44
  • yeap, that what i want! i need link to the post appears on the user timeline. – SuperYegorius Mar 05 '14 at 11:46
  • possible duplicate of [How to share someone's post using Facebook Graph API](http://stackoverflow.com/questions/9307262/how-to-share-someones-post-using-facebook-graph-api) – mgorven Mar 06 '14 at 00:01

1 Answers1

1

Graph API doesn't provide an explicit share operation, but you can create a post which is a link to another post, which should be displayed as a share. Something like this:

fb.publish("me/feed", FacebookType.class, Parameter.with("link", "https://www.facebook.com/10152237769155733"));
mgorven
  • 328
  • 1
  • 10
  • In my case it doesn't recognize the method "with" it is red underlined saying that this method is undefined for the type Parameter! – MiraTech Sep 08 '16 at 14:48