Use the following method to invite a user to your facebook application.
public bool InviteAFacebookUser(string AccessToken, string AppId, string Msg)
{
bool result=false;
try
{
FacebookClient fbClient = new FacebookClient(AccessToken);
var args = new Dictionary<string, object>();
args["appId"] = AppId; //event id
args["message"] = Msg;
dynamic id = fbClient.Post("/me/apprequests", args);
result=true;
}
catch
{
//I am suppressing the exception.
}
return result;
}
public bool InviteAFacebookUser(string AccessToken, string AppId, string Msg)
{
bool result=false;
try
{
FacebookClient fbClient = new FacebookClient(AccessToken);
var args = new Dictionary<string, object>();
args["appId"] = AppId; //event id
args["message"] = Msg;
dynamic id = fbClient.Post("/me/apprequests", args);
result=true;
}
catch
{
//I am suppressing the exception.
}
return result;
}
Comments
Post a Comment