I would like to send an invitation request from my Facebook application written in C#.
Here is what I tried:
_fbService.API.notifications.sendEmail(DataList1.DataKeys[e.Item.ItemIndex].ToString(),"Invitation to play a game", "You are invited to play the game","");
This does not work, it only sends a notification, not a request.
What am I doing wrong?
If you are asking how you can send invitations to users who have not authorized your application (i.e. not inviting your application users to use a new feature or participate in an activity), then you can’t with the API.
From the API documentation – Notifications.sendEmail:
The API function that did allow this was Notifications.sendRequest but it has been disabled, perhaps due to consideration of abuse and security. See the documentation for the alternative.