Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I send an invitation request using the Facebook API?

Tags:

c#

facebook

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?

like image 384
Ahmy Avatar asked Oct 15 '22 15:10

Ahmy


1 Answers

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:

Sends an email to the specified users, who have both authorized your application and granted it the email extended permission.

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.

like image 69
Ajw Avatar answered Oct 20 '22 02:10

Ajw