Alexei
Alexei

Reputation: 1339

Does Facebook allow send notifications via application sdk?

Recently I tryed to send an application notification, but i got error:

(OAuthException) (#2) Failed to create any app request

code is:

FacebookClient fbClient = new FacebookClient(access_token);
var args = new Dictionary<string, object>();
args["message"] = "Invitation to app";
args["title"] = "Super title";
args["data"] = "you are welcome";
fbClient.Post("/" + fbid + "/apprequests", args);

access_token obtained using:

scope: offline_access, publish_stream, user_photos, publish_actions, read_stream, email

Upvotes: 0

Views: 1480

Answers (1)

ori
ori

Reputation: 7847

Sending app-generated requests is done with an application access token, obtained via the following url: https://graph.facebook.com/oauth/access_token?client_id=APPID&client_secret=APPSECRET&grant_type=client_credentials

See documentation

Upvotes: 5

Related Questions