does notifications.sendEMail work??

Jan 26, 2010 at 9:18 PM

hi

i cant get notifications.sendemail work for me. it always returns null and there is no email :(

the user to receive the email has given to the app email extended permission

what is it i am missing?!?!?

my facebook.dll version is 3.0.0.0

here is my code

<font size="2" color="#0000ff"><font size="2" color="#0000ff">
public 
</font></font>
<font size="2" color="#0000ff"></font>
Facebook.Session.IFrameCanvasSession sess;
public Facebook.Rest.Api api;
user u;
sess = new Facebook.Session.IFrameCanvasSession("xxx", "xxx");
        
        if (sess.UserId == 0)
        {
            sess.Login();
        }

        api = new Facebook.Rest.Api(sess);
        u = api.Users.GetInfo(sess.UserId);

        try
        {
            string mailText = "x";
            string mailSubject = "x";
            string fbml = null;
            var result = api.Notifications.SendEmail("100000478341807", mailSubject, mailText, fbml);
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
        }

Jan 27, 2010 at 2:27 AM

It does work, I run it successfully every day.  I think I posted working code in another thread here if you search for it.

With that said, it is a little pointless to invest the effort in getting it to work at this point.  Facebook is deprecating it in just a few weeks, so it will stop working.  Better to focus on capturing real or proxied email addresses and do your own system.net.mail smtp sender routine.

Jan 29, 2010 at 12:39 PM
patja wrote:

It does work, I run it successfully every day.  I think I posted working code in another thread here if you search for it.

With that said, it is a little pointless to invest the effort in getting it to work at this point.  Facebook is deprecating it in just a few weeks, so it will stop working.  Better to focus on capturing real or proxied email addresses and do your own system.net.mail smtp sender routine.

 Hi Patja,

I am not getting mails using notifications.sendemail. I am not getting any error also. Is this method working in facebook.dll version is 3.0.0.0.

Thanks,

Ibrahim.

Jan 29, 2010 at 3:58 PM

I use the REST api, and my call to SendEmail looks like this:

 

                var emailresponse = api.Notifications.SendEmail(user.UserID.ToString(), "Your pregnancy updates from BirthWatch", "", fbmlemail.ToString());

                var emailresponse = api.Notifications.SendEmail(userid, "email subject", "", fbmlemail.ToString());

 

 

 

Feb 1, 2010 at 5:04 AM
patja wrote:

I use the REST api, and my call to SendEmail looks like this:

 

                var emailresponse = api.Notifications.SendEmail(user.UserID.ToString(), "Your pregnancy updates from BirthWatch", "", fbmlemail.ToString());

                var emailresponse = api.Notifications.SendEmail(userid, "email subject", "", fbmlemail.ToString());

 

 

 

 Hi Patja,

Thanks for the quick response.

I am also using the rest api,but i am not able to send email notifications.

<font size="2">

 

</font>

 

List<long> recipient = new List<long>();

recipient .Add(myuserid);

<font size="2">

 

</font>

var response=api.Notifications.SendEmail(recipient , "test", "test", "fbml");

 As  a response i am getting null value.Please help me regarding this

Thanks,

Ibrahim