if(e.Uri.ToString().StartsWith("http://www.facebook.com/connect/login_success.html")) { AccessToken = e.Uri.Fragment.Split('&')[0].Replace("#access_token=", ""); MessageBox.Show(AccessToken); FBClient = new FacebookClient(AccessToken); FacebookMediaObject mediaObject = new FacebookMediaObject { FileName = "photo1", ContentType = "image/jpeg" }; var bytes = System.IO.File.ReadAllBytes("C:\\Users\\user\\Downloads\\WpfCloud\\WpfCloud\\WpfCloud\\photo1.jpg"); mediaObject.SetValue(bytes); var postInfo = new Dictionary<string,>(); postInfo.Add("message", "MD ALIF"); postInfo.Add("image", mediaObject); FBClient.Post("/" + "1561850604041740" + "/photos", postInfo); }
FBClient.Post("/" + "1561850604041740" + "/photos", postInfo);
pre
User Access Token – The user token is the most commonly used type of token. This kind of access token is needed any time the app calls an API to read, modify or write a specific person's Facebook data on their behalf. User access tokens are generally obtained via a login dialog and require a person to permit your app to obtain one.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)