[英]How to post to user's wall from application's name?
I tried to post to users wall using application access token but it still posts from users name. 我尝试使用应用程序访问令牌将其发布到用户墙,但它仍从用户名发布。 Is it possible to post from application's name? 是否可以从应用程序的名称发布?
var fbc = new FacebookWebClient();
var wc = new WebClient();
var tokenStr = wc.DownloadString(string.Format("https://graph.facebook.com/oauth/access_token?client_id={0}&client_secret={1}&grant_type=client_credentials",
FacebookApplication.Current.AppId, FacebookApplication.Current.AppSecret));
fbc.AccessToken = tokenStr.Replace("access_token=", string.Empty);
dynamic parameters = new ExpandoObject();
parameters.message = "testMessage";
//parameters.link = pageLink;
parameters.name = "testCaption";
dynamic result = fbc.Post(string.Format("{0}/feed", userID), parameters);
var fbPost = new FacebookClient ( accessToken );
dynamic result = fbPost.Post ( "me/feed", new { message = "Welcome to C# SDK and me" } );
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.