所以我在facebooksdk.net上使用了这段代码
private async void PublishStory()
{
await this.loginButton.RequestNewPermissions("publish_stream");
var facebookClient = new Facebook.FacebookClient(this.loginButton.CurrentSession.AccessToken);
var postParams = new
{
name = "Facebook SDK for .NET",
caption = "Build great social apps and get more installs.",
description = "The Facebook SDK for .NET makes it easier and faster to develop Facebook integrated .NET apps.",
link = "http://facebooksdk.net/",
picture = "http://facebooksdk.net/assets/img/logo75x75.png"
};
try
{
dynamic fbPostTaskResult = await facebookClient.PostTaskAsync("/me/feed", postParams);
var result = (IDictionary<string, object>)fbPostTaskResult;
Dispatcher.BeginInvoke(() =>
{
MessageBox.Show("Posted Open Graph Action, id: " + (string)result["id"], "Result", MessageBoxButton.OK);
});
}
catch (Exception ex)
{
Dispatcher.BeginInvoke(() =>
{
MessageBox.Show("Exception during post: " + ex.Message, "Error", MessageBoxButton.OK);
});
}
}
当我点按发布按钮时,它会共享预设链接,如何将其更改为用户输入文本框?我不想使用系统facebook,因为我正在建立一个Facebook客户端