我如何使用restfb在Facebook上分享一篇文章 [英] how do i share a post on facebook using restfb
本文介绍了我如何使用restfb在Facebook上分享一篇文章的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
FacebookClient fb = new DefaultFacebookClient(令牌);
FacebookType message = fb.publish(pid +/ feed,FacebookType.class,Parameter.with(message,description));
现在我做什么分享发布的文章?
非常感谢您的帮助!
解决方案
图形API不提供明确的共享操作,但您可以创建一个链接到另一个帖子的帖子,应该显示为一个共享。这样的东西:
fb.publish(me / feed,FacebookType.class,Parameter.with(link https://www.facebook.com/10152237769155733));
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!
解决方案
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"));
这篇关于我如何使用restfb在Facebook上分享一篇文章的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文