Ok so I am 100% new to sharing things from C# on facebook.
I need a sample code of how to share an Image on my facebook as a photo ?
Please do NOT answer with ( Google it, I dnt know, why ?, impossible, Facebook SDK )...
Your question is a bit vague. When you say "in C#", you mean in a web, a window, or a service environment? Because the way Facebook does it is that there has to be some authentication in the process, and that is achieved via redirecting to Facebook for a user to login, and THEN send the photo for sharing. It's quite a process, not just a one-line code that does magic.
In any case, you have to do the following, and you have to figure out where you place it in your environment:
Here's the code:
// Step 2: you have to research what TheScope will be from Facebook API that gives you access to photos
Response.Redirect(string.Format("https://graph.facebook.com/oauth/access_token?client_id={0}&scope={1}&redirect_uri={2}"), MyAppCode, TheScope, MyRedirectingURL);
// Step 3: this is on the `Page_Load` of MyRedirectingURL.
// AnotherRedirectingURL will be your final destination on your app
using (var wc = new WebClient())
{
string token = wc.DownloadString(string.Format("https://graph.facebook.com/oauth/access_token?client_id={0}&client_secret={1}&code={2}&redirect_uri={3}", MyAppCode, MyAppSecretCode, TheCode, AnotherRedirectingURL));
}
// Step 4: Use the token to start stream up or down
using (var wc = new WebClient())
{
Uri uploadUri = new Uri(string.Format("https://graph.facebook.com/{0}?{1}", PhotoUploadCommand, token));
// Find out what the PhotoUploadCommand is supposed to be from the Facebook API
// use wc and uploadUri to upload the photo
}
Bottom line, you have to do your research on this... it's not that straightforward. It's the sad truth that I had to go through to do what you're doing.