C# 使用unity3d的Facebook通知

C# 使用unity3d的Facebook通知,c#,facebook,facebook-graph-api,unity3d,C#,Facebook,Facebook Graph Api,Unity3d,我使用facebook unity sdk创建了facebook应用程序。现在我正在尝试发送通知,但只收到“下载失败”错误 string href=“mysite.com”; string template=“这是测试通知文本”; 字典通知数据=新字典() {{“href”,href},{“template”,template}; FB.API(“/me/notes”、HttpMethod.POST、NotificationCallback、notificationData); 您无法从客户端发

我使用facebook unity sdk创建了facebook应用程序。现在我正在尝试发送通知,但只收到“下载失败”错误

string href=“mysite.com”;
string template=“这是测试通知文本”;
字典通知数据=新字典()
{{“href”,href},{“template”,template};
FB.API(“/me/notes”、HttpMethod.POST、NotificationCallback、notificationData);

您无法从客户端发送通知,因为它需要应用程序访问令牌(您确实不想与玩家共享)。改为从你的网站发送。 或 你说的是
那个没有href参数

不,我说的是。例如,我发现有ios和android sdk的示例,所以我们可以从客户端发送通知。应用程序访问令牌仅在画布应用程序中需要,但unity应用程序不是画布,或者我不明白什么?是的,unity web客户端无论如何都是画布应用程序。所以你需要应用访问令牌。
string href = "mysite.com";
string template = "This is test notification text";

Dictionary<string, string> notificationData = new Dictionary<string, string>()
            {{"href", href}, {"template", template}};

FB.API("/me/notes", HttpMethod.POST, NotificationCallback, notificationData);