Click here to Skip to main content
15,886,137 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
Currently I am using wpf c# to integrate facebook and share image over facebook timeline or facebook wall
But when i use my code it will shows oauth error, depricated version you use, or some scopes has been removed by facebook
Currently facebook is using Share Dialog Share Dialog

and for Desktop application : Desktop or Native application

In Code
fbtoken
is the facebook client Object which i carry for token
and facebook rest detail with appid and secret key of my facebook app.

Please help me out.

What I have tried:

C#
public void UploadContent()
        {
            string photoAlbumID = "199967900755629";

            FacebookMediaObject facebookUploader = new FacebookMediaObject { FileName = "Carnival-Mask-Costume-Ideas-800x600.jpg", ContentType = "image/png" };

            //var bytes = File.ReadAllBytes(System.IO.Path.GetDirectoryName(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName) + "\\" + facebookUploader.FileName);
            var bytes = File.ReadAllBytes(@"D:\Gallery\Carnival-Mask-Costume-Ideas-800x600.jpg");
            facebookUploader.SetValue(bytes);
            var postInfo = new Dictionary<string, object>();
            postInfo.Add("message", "test photo");
            postInfo.Add("image", facebookUploader);
            postInfo.Add("access_token", fbtoken.AccessToken);
            var fbResult = fbtoken.Post("/" + photoAlbumID + "/photos", postInfo);
            dynamic result = (IDictionary<string, object>)fbResult;
        }
Posted
Comments
[no name] 15-Sep-18 17:07pm    
I'm pleased to hear people are having issues trying to access FaceFool.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900