Submitting game dashboard news items with C# SDK
I'm looking for samples/references to submitting dashboard news items. I see the REST API is getting deprecated, and after too many hours looking, I can't find any documen开发者_运维技巧tation on submitting game notifications ("You've been invited to a new game," "It's your turn," etc).
You might use something like:
var fwc = new FacebookWebClient(AccessToken);
fwc.Post("me/apprequests", new Dictionary<string, object> {
{"message", MessageToSend }
});
The sort of game notifications that you are looking for sound like "App-generated Requests" (See "Notications" at: https://developers.facebook.com/docs/guides/canvas/). Following their link (https://developers.facebook.com/docs/appsonfacebook/tutorial/#requests), you'll see that there is an API called "apprequests" that you can call with a value of "message".
Note also that you should clean up these requests once the user acts on them by clicking / accepting the request back into your app.
精彩评论