I am following this post to post photo on my page from some other page using Facebook C# SDK
When I am trying to create FacebookMediaObject then I am getting error as
"The given path's format is not supported."
My code is this:
parameters.source = new FacebookMediaObject
{
ContentType = "image/png",
FileName = Path.GetFileName(ab.picture)
}.SetValue(System.IO.File.ReadAllBytes(ab.picture));
I know why I am getting this error because ab.picture is an image hosted on facebook (e.g. https://fbcdn-photos-h-a.akamaihd.net/hphotos-ak-frc3/t1.0-0/10375041_921810831169221_8715777431539280147_s.png) & not absolute path. But I only have image on this path.
Is there any way to pass this image directly to FacebookMediaObject & post photo on my page ?