我正在使用Unity3d制作游戏,使用FB.Feed()时遇到问题 我看了facebook的文件,我看到: "提示用户发布Feed故事。它可以发布到他/她自己的时间线(如果toId为空,或设置为用户自己的Facebook用户ID),或者发布到一个朋友的那个(如果toID设置为该朋友的用户ID) )"
public static void Feed(
string toId = "",
string link = "",
string linkName = "",
string linkCaption = "",
string linkDescription = "",
string picture = "",
string mediaSource = "",
string actionName = "",
string actionLink = "",
string reference = "",
Dictionary<string,string[]> properties,
FacebookDelegate callback = null
)
如何使用此功能向任何朋友的留言板发送消息?
答案 0 :(得分:0)
首先,你必须得到你的朋友。你可以使用
FB.API ("/me/friends/?fields=id", Facebook.HttpMethod.GET, callback);
it returns list ID friends.
然后,调用此方法打开对话框。
FB.Feed(
toId:"YOUR FRIEND ID",
link: "https://example.com/myapp/?storyID=thelarch",
linkName: "The Larch",
linkCaption: "I thought up a witty tagline about larches",
linkDescription: "There are a lot of larch trees around here, aren't there?",
picture: "https://example.com/myapp/assets/1/larch.jpg",
callback: LogCallback
);
就是这样。