I read a lot of documentation and watched a video about Facebook C# SDK but I still cannot get my head around it! I need to do the following but I do not know if that's even possible...
- User clicks on a button on mysite.com. The button opens up a dialog that asks the user to sign-in with their facebook account. In case they do, I need to access their friends' list and send invites to their friends asking them to register at mysite.com
- The invite links should take them to mysite.com/User/Register?code=
Now the thing I do not understand is would the invites actually take them to my site? Or simply invite their friends to use a "facebook application"? I understand that I need a Facebook app in order to get an AppId and some other stuff that are required for authentication. But, the application will not really do anything!! And I do not want the users to land on some Facebook page after they've accepted the invitation, I want them to be taken to the registration page on mysite.com.
UPDATE:
Ok I'm starting to get the hang of it... I'm trying to post on my wall from the application, but nothing showed up... It asked for the post permissions but there seems to be something wrong... Here's my code:
[CanvasAuthorize(Permissions = "user_about_me,publish_stream")]
public ActionResult Index()
{
var fb = new FacebookWebClient();
dynamic result = fb.Get("me");
var postArgs = new Dictionary<string, string>();
postArgs["message"] = "This is just a test message from the Facebook test application!";
var post = fb.Post("/me/feed", postArgs);
return RedirectToAction("About");
}
Any thoughts?